Sha256: 05d309201bba5d005064a71e41ed258d2fb99c3a428dd4f499abaf61d5feb9a2

Contents?: true

Size: 637 Bytes

Versions: 103

Compression:

Stored size: 637 Bytes

Contents

module Psych
  module Streaming
    module ClassMethods
      ###
      # Create a new streaming emitter.  Emitter will print to +io+.  See
      # Psych::Stream for an example.
      def new io
        emitter      = const_get(:Emitter).new(io)
        class_loader = ClassLoader.new
        ss           = ScalarScanner.new class_loader
        super(emitter, ss, {})
      end
    end

    ###
    # Start streaming using +encoding+
    def start encoding = Nodes::Stream::UTF8
      super.tap { yield self if block_given?  }
    ensure
      finish if block_given?
    end

    private
    def register target, obj
    end
  end
end

Version data entries

103 entries across 75 versions & 6 rubygems

Version Path
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.3.1 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.3.0 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.5 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.4 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l32/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/l64/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/osx/lib/ruby/2.2.0/psych/streaming.rb
rb2exe-0.2.3 bin/traveling-ruby-2.2.2/win/lib/ruby/2.2.0/psych/streaming.rb