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.
-
#relationship ⇒ Object
readonly
Returns the value of attribute relationship.
Instance Method Summary collapse
- #action ⇒ Object
- #country ⇒ Object
- #created_at ⇒ Object
- #id ⇒ Object
- #id_type ⇒ Object
-
#initialize(data, product) ⇒ Holder
constructor
A new instance of Holder.
- #name ⇒ 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 @relationship = Relationship.new(@data[:relationships].first, 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 |
#relationship ⇒ Object (readonly)
Returns the value of attribute relationship.
6 7 8 |
# File 'lib/ftf/mappings/holder.rb', line 6 def relationship @relationship end |
Instance Method Details
#action ⇒ Object
14 15 16 |
# File 'lib/ftf/mappings/holder.rb', line 14 def action @data[:action] end |
#country ⇒ Object
34 35 36 |
# File 'lib/ftf/mappings/holder.rb', line 34 def country @data[:country] end |
#created_at ⇒ Object
30 31 32 |
# File 'lib/ftf/mappings/holder.rb', line 30 def created_at @data[:created_at] 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 |