Class: FTF::Mappings::Holder

Inherits:
Object
  • Object
show all
Defined in:
lib/ftf/mappings/holder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#productObject (readonly)

Returns the value of attribute product.



6
7
8
# File 'lib/ftf/mappings/holder.rb', line 6

def product
  @product
end

#relationshipObject (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

#actionObject



14
15
16
# File 'lib/ftf/mappings/holder.rb', line 14

def action
  @data[:action]
end

#countryObject



34
35
36
# File 'lib/ftf/mappings/holder.rb', line 34

def country
  @data[:country]
end

#created_atObject



30
31
32
# File 'lib/ftf/mappings/holder.rb', line 30

def created_at
  @data[:created_at]
end

#idObject



26
27
28
# File 'lib/ftf/mappings/holder.rb', line 26

def id
  @data[:id]
end

#id_typeObject



22
23
24
# File 'lib/ftf/mappings/holder.rb', line 22

def id_type
  @data[:id_type]
end

#nameObject



18
19
20
# File 'lib/ftf/mappings/holder.rb', line 18

def name
  @data[:name]
end