Class: Autobots::Assembler

Inherits:
Object
  • Object
show all
Includes:
Helpers::Caching
Defined in:
lib/autobots/assembler.rb

Direct Known Subclasses

ActiveRecordAssembler

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers::Caching

prepended

Constructor Details

#initialize(identifiers, options = {}) ⇒ Assembler

Returns a new instance of Assembler.



6
7
8
9
# File 'lib/autobots/assembler.rb', line 6

def initialize(identifiers, options = {})
  @identifiers, @options = identifiers, options
  @objects = assemble(identifiers)
end

Instance Attribute Details

#identifiersObject (readonly)

Returns the value of attribute identifiers.



4
5
6
# File 'lib/autobots/assembler.rb', line 4

def identifiers
  @identifiers
end

#objectsObject (readonly)

Returns the value of attribute objects.



4
5
6
# File 'lib/autobots/assembler.rb', line 4

def objects
  @objects
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/autobots/assembler.rb', line 4

def options
  @options
end

Instance Method Details

#dataObject



11
12
13
# File 'lib/autobots/assembler.rb', line 11

def data
  roll_out(objects)
end