class Psych::Visitors::YAMLTree

def push object

def push object
  start unless started?
  version = []
  version = [1,1] if @options[:header]
  case @options[:version]
  when Array
    version = @options[:version]
  when String
    version = @options[:version].split('.').map { |x| x.to_i }
  else
    version = [1,1]
  end if @options.key? :version
  @emitter.start_document version, [], false
  accept object
  @emitter.end_document !@emitter.streaming?
end