Class: IntegratedData::Entity::Integrator

Inherits:
Struct
  • Object
show all
Defined in:
lib/integrated_data/entity/integrator.rb,
lib/integrated_data/entity/integrator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Integrator

Returns a new instance of Integrator.



8
9
10
11
# File 'lib/integrated_data/entity/integrator.rb', line 8

def initialize(*args)
  @cache = {}
  super
end

Instance Attribute Details

#identifiersObject

Returns the value of attribute identifiers

Returns:

  • (Object)

    the current value of identifiers



5
6
7
# File 'lib/integrated_data/entity/integrator.rb', line 5

def identifiers
  @identifiers
end

#lookupsObject

Returns the value of attribute lookups

Returns:

  • (Object)

    the current value of lookups



5
6
7
# File 'lib/integrated_data/entity/integrator.rb', line 5

def lookups
  @lookups
end

Instance Method Details

#attributesObject



13
14
15
16
17
18
19
# File 'lib/integrated_data/entity/integrator.rb', line 13

def attributes
  Hash[
    lookups.group_by(&:attribute).map do |attribute, lookups|
      [ attribute, find_attribute_for(lookups, attribute) ]
    end
  ]
end