Class: Pura::Processing::Builder

Inherits:
Object
  • Object
show all
Includes:
Chainable
Defined in:
lib/pura/processing/builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Chainable

#apply, #branch, #call, #convert, #instrumenter, #loader, #operation, #saver, #source

Constructor Details

#initialize(options) ⇒ Builder

Returns a new instance of Builder.



14
15
16
# File 'lib/pura/processing/builder.rb', line 14

def initialize(options)
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Pura::Processing::Chainable

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



12
13
14
# File 'lib/pura/processing/builder.rb', line 12

def options
  @options
end

Instance Method Details

#call!(**call_options) ⇒ Object

Calls the pipeline to perform the processing from built options.



19
20
21
22
23
# File 'lib/pura/processing/builder.rb', line 19

def call!(**call_options)
  instrument do
    Pipeline.new(pipeline_options).call(**call_options)
  end
end