Support for the Ruby 2.1 series ended on March 31 2017. See here for details.

In Files

  • psych/lib/psych/streaming.rb

Methods

Psych::Streaming::ClassMethods

Public Instance Methods

new(io) click to toggle source

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

 
               # File 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