Class: Yuriita::Assembler

Inherits:
Object
  • Object
show all
Defined in:
lib/yuriita/assembler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration) ⇒ Assembler

Returns a new instance of Assembler.



5
6
7
# File 'lib/yuriita/assembler.rb', line 5

def initialize(configuration)
  @configuration = configuration
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



3
4
5
# File 'lib/yuriita/assembler.rb', line 3

def configuration
  @configuration
end

Instance Method Details

#build(query) ⇒ Object



9
10
11
12
13
# File 'lib/yuriita/assembler.rb', line 9

def build(query)
  configuration.map do |definition|
    definition.apply(query: query)
  end
end