Class: FTF::Mappings::Holder
- Inherits:
-
Object
- Object
- FTF::Mappings::Holder
- Defined in:
- lib/ftf/mappings/holder.rb
Instance Attribute Summary collapse
-
#product ⇒ Object
readonly
Returns the value of attribute product.
-
#relationships ⇒ Object
readonly
Returns the value of attribute relationships.
Instance Method Summary collapse
- #action ⇒ Object
- #created_at ⇒ Object
- #expedition_country ⇒ Object
- #id ⇒ Object
- #id_type ⇒ Object
-
#initialize(data, product) ⇒ Holder
constructor
A new instance of Holder.
- #name ⇒ Object
- #nationality_country ⇒ Object
- #residence_country ⇒ Object
Constructor Details
#initialize(data, product) ⇒ Holder
Returns a new instance of Holder.
8 9 10 11 12 |
# File 'lib/ftf/mappings/holder.rb', line 8 def initialize(data, product) @data = data @product = product @relationships = @data[:relationships].map { |relationship| Relationship.new(relationship, self) } end |
Instance Attribute Details
#product ⇒ Object (readonly)
Returns the value of attribute product.
6 7 8 |
# File 'lib/ftf/mappings/holder.rb', line 6 def product @product end |
#relationships ⇒ Object (readonly)
Returns the value of attribute relationships.
6 7 8 |
# File 'lib/ftf/mappings/holder.rb', line 6 def relationships @relationships end |
Instance Method Details
#action ⇒ Object
14 15 16 |
# File 'lib/ftf/mappings/holder.rb', line 14 def action @data[:action] end |
#created_at ⇒ Object
30 31 32 |
# File 'lib/ftf/mappings/holder.rb', line 30 def created_at @data[:created_at] end |
#expedition_country ⇒ Object
34 35 36 |
# File 'lib/ftf/mappings/holder.rb', line 34 def expedition_country @data[:expedition_country] end |
#id ⇒ Object
26 27 28 |
# File 'lib/ftf/mappings/holder.rb', line 26 def id @data[:id] end |
#id_type ⇒ Object
22 23 24 |
# File 'lib/ftf/mappings/holder.rb', line 22 def id_type @data[:id_type] end |
#name ⇒ Object
18 19 20 |
# File 'lib/ftf/mappings/holder.rb', line 18 def name @data[:name] end |
#nationality_country ⇒ Object
38 39 40 |
# File 'lib/ftf/mappings/holder.rb', line 38 def nationality_country @data[:nationality_country] end |
#residence_country ⇒ Object
42 43 44 |
# File 'lib/ftf/mappings/holder.rb', line 42 def residence_country @data[:residence_country] end |