Class: FTF::Mappings::Relationship

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, holder) ⇒ Relationship

Returns a new instance of Relationship.



8
9
10
11
# File 'lib/ftf/mappings/relationship.rb', line 8

def initialize(data, holder)
  @data = data
  @holder = holder
end

Instance Attribute Details

#holderObject (readonly)

Returns the value of attribute holder.



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

def holder
  @holder
end

Instance Method Details

#actionObject



13
14
15
# File 'lib/ftf/mappings/relationship.rb', line 13

def action
  @data[:action]
end

#canceled_atObject



25
26
27
# File 'lib/ftf/mappings/relationship.rb', line 25

def canceled_at
  @data[:canceled_at].to_s
end

#created_atObject



21
22
23
# File 'lib/ftf/mappings/relationship.rb', line 21

def created_at
  @data[:created_at]
end

#previous_typeObject



29
30
31
# File 'lib/ftf/mappings/relationship.rb', line 29

def previous_type
  @data[:previous_type]
end

#typeObject



17
18
19
# File 'lib/ftf/mappings/relationship.rb', line 17

def type
  @data[:type]
end