Module: Leftovers::ProcessorBuilders::TransformSet

Defined in:
lib/leftovers/processor_builders/transform_set.rb

Class Method Summary collapse

Class Method Details

.build(transforms, final_processor) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/leftovers/processor_builders/transform_set.rb', line 7

def build(transforms, final_processor)
  each_builder(final_processor).each_or_self(transforms) do |transform|
    case transform
    when ::Hash, ::Symbol then TransformChain.build(transform, final_processor)
    # :nocov:
    else raise UnexpectedCase, "Unhandled value #{transform.inspect}"
      # :nocov:
    end
  end
end