Class: ImageProcessing::Builder

Inherits:
Object
  • Object
show all
Includes:
Chainable
Defined in:
lib/image_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.



7
8
9
# File 'lib/image_processing/builder.rb', line 7

def initialize(options)
  @options = options
end

Dynamic Method Handling

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/image_processing/builder.rb', line 5

def options
  @options
end

Instance Method Details

#call!(**call_options) ⇒ Object

Calls the pipeline to perform the processing from built options.



12
13
14
15
16
# File 'lib/image_processing/builder.rb', line 12

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