Module: Psych::Streaming

Included in:
JSON::Stream, Stream
Defined in:
lib/psych/streaming.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#start(encoding = Nodes::Stream::UTF8) ⇒ Object

Start streaming using encoding



18
19
20
21
22
# File 'lib/psych/streaming.rb', line 18

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