Class: ImageProcessing::Builder

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

Constant Summary

Constants included from Chainable

Chainable::DEFAULT_OPTIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Chainable

#apply, #branch, #call, #convert, #loader, #method_missing, #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!(**options) ⇒ Object

Calls the pipeline to perform the processing from built options.



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

def call!(**options)
  Pipeline.new(self.options).call(**options)
end