Class: Yuriita::Assembler
- Inherits:
-
Object
- Object
- Yuriita::Assembler
- Defined in:
- lib/yuriita/assembler.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
Instance Method Summary collapse
- #build(query) ⇒ Object
-
#initialize(configuration) ⇒ Assembler
constructor
A new instance of Assembler.
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
#configuration ⇒ Object (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 |