123456789_123456789_123456789_123456789_123456789_

Class: Psych::Stream::Emitter

Do not use. This class is for internal use only.
Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Psych::Emitter
Defined in: ext/psych/lib/psych/stream.rb

Constant Summary

::Psych::Handler - Inherited

EVENTS, OPTIONS

Class Method Summary

::Psych::Emitter - Inherited

.new

Create a new ::Psych::Emitter that writes to io.

Instance Attribute Summary

::Psych::Emitter - Inherited

#canonical

Get the output style, canonical or not.

#canonical=

::Psych::Set the output style to canonical, or not.

#indentation

Get the indentation level.

#indentation=

::Psych::Set the indentation level to level.

#line_width

Get the preferred line width.

#line_width=

::Psych::Set the preferred line with to width.

::Psych::Handler - Inherited

#streaming?

Is this handler a streaming handler?

Instance Method Summary

::Psych::Emitter - Inherited

#alias

Emit an alias with anchor.

#end_document

End a document emission with an implicit ending.

#end_mapping

Emit the end of a mapping.

#end_sequence

End sequence emission.

#end_stream

End a stream emission.

#scalar

Emit a scalar with value, anchor, tag, and a plain or quoted string type with style.

#start_document

Start a document emission with YAML version, tags, and an implicit start.

#start_mapping

Start emitting a YAML map with anchor, tag, an implicit start and end, and style.

#start_sequence

Start emitting a sequence with anchor, a tag, implicit sequence start and end, along with style.

#start_stream

Start a stream emission with encoding

::Psych::Handler - Inherited

#alias

Called when an alias is found to anchor.

#empty

Called when an empty event happens.

#end_document

Called with the document ends.

#end_mapping

Called when a map ends.

#end_sequence

Called when a sequence ends.

#end_stream

Called when the YAML stream ends.

#event_location

Called before each event with line/column information.

#scalar

Called when a scalar value is found.

#start_document

Called when the document starts with the declared version, tag_directives, if the document is implicit.

#start_mapping

Called when a map starts.

#start_sequence

Called when a sequence is started.

#start_stream

Called with encoding when the YAML stream starts.

Constructor Details

This class inherits a constructor from Psych::Emitter

Instance Attribute Details

#streaming?Boolean (readonly)

[ GitHub ]

  
# File 'ext/psych/lib/psych/stream.rb', line 30

def streaming?
  true
end

Instance Method Details

#end_document(implicit_end = !streaming?)

[ GitHub ]

  
# File 'ext/psych/lib/psych/stream.rb', line 26

def end_document implicit_end = !streaming?
  super
end