Module: Psych::Streaming
- Included in:
- JSON::Stream, Stream
- Defined in:
- lib/psych/streaming.rb
Instance Method Summary collapse
-
#initialize(io) ⇒ Streaming
Create a new streaming emitter.
-
#start(encoding = Nodes::Stream::UTF8) ⇒ Object
Start streaming using
encoding
.
Instance Method Details
#initialize(io) ⇒ Streaming
Create a new streaming emitter. Emitter will print to io
. See Psych::Stream for an example.
6 7 8 |
# File 'lib/psych/streaming.rb', line 6 def initialize io super({}, self.class.const_get(:Emitter).new(io)) end |