class Cucumber::Runtime

def create_formatter(factory, formatter_options, path_or_io)

def create_formatter(factory, formatter_options, path_or_io)
  if accept_options?(factory)
    return factory.new(@configuration, formatter_options) if path_or_io.nil?
    factory.new(@configuration.with_options(out_stream: path_or_io),
                formatter_options)
  else
    return factory.new(@configuration) if path_or_io.nil?
    factory.new(@configuration.with_options(out_stream: path_or_io))
  end
end