123456789_123456789_123456789_123456789_123456789_

Module: Psych::Streaming::ClassMethods

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
Defined in: ext/psych/lib/psych/streaming.rb

Instance Method Summary

Instance Method Details

#new(io)

Create a new streaming emitter. ::Psych::Emitter will print to io. See ::Psych::Stream for an example.

[ GitHub ]

  
# File 'ext/psych/lib/psych/streaming.rb', line 7

def new io
  emitter      = const_get(:Emitter).new(io)
  class_loader = ClassLoader.new
  ss           = ScalarScanner.new class_loader
  super(emitter, ss, {})
end