Class: Moblues::DataModel::Relationship
- Inherits:
-
Struct
- Object
- Struct
- Moblues::DataModel::Relationship
- Defined in:
- lib/moblues/data_model/relationship.rb
Instance Attribute Summary collapse
-
#destination_entity ⇒ Object
Returns the value of attribute destination_entity.
-
#name ⇒ Object
Returns the value of attribute name.
-
#ordered ⇒ Object
Returns the value of attribute ordered.
-
#to_many ⇒ Object
Returns the value of attribute to_many.
Instance Method Summary collapse
-
#initialize(params) ⇒ Relationship
constructor
A new instance of Relationship.
Constructor Details
#initialize(params) ⇒ Relationship
Returns a new instance of Relationship.
6 7 8 9 10 11 12 13 14 |
# File 'lib/moblues/data_model/relationship.rb', line 6 def initialize(params) p = params.compact super( p.fetch(:name), p.fetch(:destination_entity), p.fetch(:to_many, false), p.fetch(:ordered, false) ) end |
Instance Attribute Details
#destination_entity ⇒ Object
Returns the value of attribute destination_entity
5 6 7 |
# File 'lib/moblues/data_model/relationship.rb', line 5 def destination_entity @destination_entity end |
#name ⇒ Object
Returns the value of attribute name
5 6 7 |
# File 'lib/moblues/data_model/relationship.rb', line 5 def name @name end |
#ordered ⇒ Object
Returns the value of attribute ordered
5 6 7 |
# File 'lib/moblues/data_model/relationship.rb', line 5 def ordered @ordered end |
#to_many ⇒ Object
Returns the value of attribute to_many
5 6 7 |
# File 'lib/moblues/data_model/relationship.rb', line 5 def to_many @to_many end |