Class: Foobara::Manifest::DetachedEntity

Inherits:
Model show all
Defined in:
foobara-0.0.110/projects/manifest/src/foobara/manifest/detached_entity.rb

Constant Summary

Constants included from TruncatedInspect

TruncatedInspect::MAX_LENGTH

Instance Attribute Summary

Attributes inherited from BaseManifest

#path, #root_manifest

Instance Method Summary collapse

Methods inherited from Model

#attributes_type, #full_model_name, #has_associations?

Methods inherited from Type

#base_type, #builtin?, #custom?, #detached_entity?, #entity?, #extends_symbol?, #full_type_name, #model?, new, #target_class, #to_type_declaration_from_declaration_data, #type_manifest, #type_name, #types_depended_on

Methods inherited from BaseManifest

#==, #[], category_to_manifest_class, #domain, #eql?, #find_type, #global_domain, #global_organization, #hash, #initialize, #key?, #method_missing, optional_key, #optional_key?, optional_key_defaults, optional_keys, #organization, #parent, #parent_category, #parent_name, #relevant_manifest, #respond_to_missing?, #scoped_category

Methods included from TruncatedInspect

#inspect, truncating

Constructor Details

This class inherits a constructor from Foobara::Manifest::BaseManifest

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Foobara::Manifest::BaseManifest

Instance Method Details

#attribute_namesObject



21
22
23
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/detached_entity.rb', line 21

def attribute_names
  super - [primary_key_name]
end

#full_detached_entity_nameObject



25
26
27
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/detached_entity.rb', line 25

def full_detached_entity_name
  full_model_name
end

#primary_key_nameObject



13
14
15
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/detached_entity.rb', line 13

def primary_key_name
  primary_key_attribute.to_s
end

#primary_key_typeObject



17
18
19
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/detached_entity.rb', line 17

def primary_key_type
  @primary_key_type ||= TypeDeclaration.new(root_manifest, [*path, :primary_key_type])
end