Class: KDomain::DomainModel::RelatedEntity
- Inherits:
-
Object
- Object
- KDomain::DomainModel::RelatedEntity
- Defined in:
- lib/k_domain/schemas/domain/old/related_entity.rb
Instance Attribute Summary collapse
-
#main_key ⇒ Object
Returns the value of attribute main_key.
-
#name ⇒ Object
Name of the entity model.
-
#name_plural ⇒ Object
Returns the value of attribute name_plural.
-
#trait1 ⇒ Object
Returns the value of attribute trait1.
-
#trait2 ⇒ Object
Returns the value of attribute trait2.
-
#trait3 ⇒ Object
Returns the value of attribute trait3.
Instance Method Summary collapse
-
#initialize(entity) ⇒ RelatedEntity
constructor
A new instance of RelatedEntity.
- #to_h ⇒ Object
Constructor Details
#initialize(entity) ⇒ RelatedEntity
Returns a new instance of RelatedEntity.
15 16 17 18 19 20 21 22 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 15 def initialize(entity) @name = entity.name @name_plural = entity.name_plural @main_key = entity.main_key @trait1 = entity.trait1 @trait2 = entity.trait2 @trait3 = entity.trait3 end |
Instance Attribute Details
#main_key ⇒ Object
Returns the value of attribute main_key.
9 10 11 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 9 def main_key @main_key end |
#name ⇒ Object
Name of the entity model
7 8 9 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 7 def name @name end |
#name_plural ⇒ Object
Returns the value of attribute name_plural.
8 9 10 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 8 def name_plural @name_plural end |
#trait1 ⇒ Object
Returns the value of attribute trait1.
11 12 13 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 11 def trait1 @trait1 end |
#trait2 ⇒ Object
Returns the value of attribute trait2.
12 13 14 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 12 def trait2 @trait2 end |
#trait3 ⇒ Object
Returns the value of attribute trait3.
13 14 15 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 13 def trait3 @trait3 end |
Instance Method Details
#to_h ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/k_domain/schemas/domain/old/related_entity.rb', line 24 def to_h { name: name, name_plural: name_plural, main_key: main_key, trait1: trait1, trait2: trait2, trait3: trait3 } end |