Class: Foobara::Manifest::Entity
- Inherits:
-
DetachedEntity
- Object
- Foobara::Model
- DetachedEntity
- Foobara::Manifest::Entity
- Defined in:
- foobara-0.0.110/projects/manifest/src/foobara/manifest/entity.rb
Instance Attribute Summary
Attributes inherited from Foobara::Model
Instance Method Summary collapse
-
#associations ⇒ Object
TODO: should this instead be on DetachedEntity??.
- #full_entity_name ⇒ Object
- #has_associations? ⇒ Boolean
Methods inherited from DetachedEntity
Methods included from DetachedEntity::Concerns::Serialize
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Methods included from DetachedEntity::Concerns::PrimaryKey
Methods included from DetachedEntity::Concerns::Equality
Methods inherited from Foobara::Model
#==, abstract, abstract?, attribute_names, #attributes, #attributes_with_delegates, #cast_attribute, #cast_attribute!, closest_namespace_module, description, domain, domain_name, #eql?, foobara_model_name, foobara_name, full_model_name, #hash, #initialize, install!, organization_name, possible_errors, #read_attribute, #read_attribute!, reset_all, subclass, #to_h, #to_json, #valid?, valid_attribute_name?, #validate!, validate_attribute_name!, #validation_errors, #write_attribute, #write_attribute!, #write_attributes, #write_attributes!
Constructor Details
This class inherits a constructor from Foobara::Model
Instance Method Details
#associations ⇒ Object
TODO: should this instead be on DetachedEntity??
20 21 22 23 24 |
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/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 'foobara-0.0.110/projects/manifest/src/foobara/manifest/entity.rb', line 15 def full_entity_name full_model_name end |
#has_associations? ⇒ Boolean
11 12 13 |
# File 'foobara-0.0.110/projects/manifest/src/foobara/manifest/entity.rb', line 11 def has_associations? associations && !associations.empty? end |