Sha256: de1709ae33c0ebbac2da6b82c182d52cebbcf4b3001eec96a0a45d684c7f5674
Contents?: true
Size: 644 Bytes
Versions: 7
Compression:
Stored size: 644 Bytes
Contents
module ImageProcessing class Builder include Chainable attr_reader :options def initialize(options) @options = options end # Calls the pipeline to perform the processing from built options. def call!(**call_options) instrument do Pipeline.new(pipeline_options).call(**call_options) end end private def instrument return yield unless options[:instrumenter] result = nil options[:instrumenter].call(**pipeline_options) { result = yield } result end def pipeline_options options.reject { |key, _| key == :instrumenter } end end end
Version data entries
7 entries across 6 versions & 3 rubygems