class Psych::Visitors::Emitter

def initialize io, options = {}

def initialize io, options = {}
  opts = [:indentation, :canonical, :line_width].find_all { |opt|
    options.key?(opt)
  }
  if opts.empty?
    @handler = Psych::Emitter.new io
  else
    du = Handler::DumperOptions.new
    opts.each { |option| du.send :"#{option}=", options[option] }
    @handler = Psych::Emitter.new io, du
  end
end