def compose_transformers(transformers, types, preprocessors, postprocessors)
      if types.length < 2
        raise ArgumentError, "too few transform types: #{types.inspect}"
      end

      processors = types.each_cons(2).map { |src, dst|
        unless processor = transformers[src][dst]
          raise ArgumentError, "missing transformer for type: #{src} to #{dst}"
        end
        processor
      }

      compose_transformer_list processors, preprocessors, postprocessors
    end
def compose_transformers(transformers, types, preprocessors, postprocessors)
      if types.length < 2
        raise ArgumentError, "too few transform types: #{types.inspect}"
      end

      processors = types.each_cons(2).map { |src, dst|
        unless processor = transformers[src][dst]
          raise ArgumentError, "missing transformer for type: #{src} to #{dst}"
        end
        processor
      }

      compose_transformer_list processors, preprocessors, postprocessors
    end
Internal: Compose multiple transformer steps into a single processor
 function.

 transformers - Two level Hash of a source mime type to a target mime type
 types - Array of mime type steps

 Returns Processor.