Module: Leftovers::ProcessorBuilders::TransformChain

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

Class Method Summary collapse

Class Method Details

.build(transforms, next_transform) ⇒ Object



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

def build(transforms, next_transform)
  case transforms
  when ::Hash then build_from_hash(transforms, next_transform)
  when ::Symbol then Transform.build(transforms, true, next_transform)
  # :nocov:
  else raise UnexpectedCase, "Unhandled value #{transforms.inspect}"
    # :nocov:
  end
end