class ImageProcessing::Pipeline

def source

Converts the source image object into a path or the accumulator object.
def source
  if @source.is_a?(String)
    @source
  elsif @source.respond_to?(:path)
    @source.path
  elsif @source.respond_to?(:to_path)
    @source.to_path
  else
    @source
  end
end