lib/image_processing/chainable.rb
def branch(loader: nil, saver: nil, operations: nil, **other_options)
      options = respond_to?(:options) ? self.options : DEFAULT_OPTIONS

      options = options.merge(loader: options[:loader].merge(loader)) if loader
      options = options.merge(saver: options[:saver].merge(saver)) if saver
      options = options.merge(operations: options[:operations] + operations) if operations
      options = options.merge(processor: self::Processor) unless self.is_a?(Builder)
      options = options.merge(other_options)

      options.freeze

      Builder.new(options)
    end
def branch(loader: nil, saver: nil, operations: nil, **other_options)
      options = respond_to?(:options) ? self.options : DEFAULT_OPTIONS

      options = options.merge(loader: options[:loader].merge(loader)) if loader
      options = options.merge(saver: options[:saver].merge(saver)) if saver
      options = options.merge(operations: options[:operations] + operations) if operations
      options = options.merge(processor: self::Processor) unless self.is_a?(Builder)
      options = options.merge(other_options)

      options.freeze

      Builder.new(options)
    end
def branch ( loader : nil , saver : nil , operations : nil , ** other_options ) options = respond_to? ( :options ) ? self . options : DEFAULT_OPTIONS options = options . merge ( loader : options [ :loader ] . merge ( loader ) ) if loader options = options . merge ( saver : options [ :saver ] . merge ( saver ) ) if saver options = options . merge ( operations : options [ :operations ] + operations ) if operations options = options . merge ( processor : self :: Processor ) unless self . is_a? ( Builder ) options = options . merge ( other_options ) options . freeze Builder . new ( options ) end
Creates a new builder object, merging current options with new options.
Creates a new builder object merging current options with new options .