Class: Foobara::Manifest::Entity
- Inherits:
-
DetachedEntity
- Object
- BaseManifest
- Type
- Model
- DetachedEntity
- Foobara::Manifest::Entity
- Defined in:
- foobara-0.5.8/projects/manifest/src/entity.rb
Constant Summary
Constants included from TruncatedInspect
Instance Attribute Summary
Attributes inherited from BaseManifest
#manifest_path, #root_manifest
Instance Method Summary collapse
-
#associations ⇒ Object
TODO: should this instead be on DetachedEntity??.
- #full_entity_name ⇒ Object
- #has_associations? ⇒ Boolean
Methods inherited from DetachedEntity
#attribute_names, #full_detached_entity_name, #primary_key_name, #primary_key_type
Methods inherited from Model
associations, #attribute_names, #attributes_type, #full_model_name, #guaranteed_to_exist?
Methods inherited from Type
#array?, #associative_array?, #attributes?, #base_type, #builtin?, #custom?, #detached_entity?, #entity?, #extends_symbol?, #full_type_name, #model?, new, #primitive?, #target_class, #to_type_declaration_from_declaration_data, #tuple?, #type_manifest, #type_name, #type_symbol, #types_depended_on
Methods inherited from BaseManifest
#==, #[], category_to_manifest_class, #domain, #domain_reference, #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, #path, #relevant_manifest, #respond_to_missing?, #scoped_category, #symbol_path
Methods included from TruncatedInspect
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
#associations ⇒ Object
TODO: should this instead be on DetachedEntity??
20 21 22 23 24 |
# File 'projects/manifest/src/entity.rb', line 20 def associations @associations ||= self[:associations].to_h do |path_key, type_name| [path_key.to_sym, Type.new(root_manifest, [:type, type_name])] end end |
#full_entity_name ⇒ Object
15 16 17 |
# File 'projects/manifest/src/entity.rb', line 15 def full_entity_name full_model_name end |
#has_associations? ⇒ Boolean
11 12 13 |
# File 'projects/manifest/src/entity.rb', line 11 def has_associations? associations && !associations.empty? end |