Class: Psych::Nodes::Stream
Overview
Represents a YAML stream. This is the root node for any YAML parse tree. This node must have one or more child nodes. The only valid child node for a Psych::Nodes::Stream node is Psych::Nodes::Document.
Constant Summary collapse
- ANY =
Any encoding
Psych::Parser::ANY
- UTF8 =
UTF-8 encoding
Psych::Parser::UTF8
- UTF16LE =
UTF-16LE encoding
Psych::Parser::UTF16LE
- UTF16BE =
UTF-16BE encoding
Psych::Parser::UTF16BE
Instance Attribute Summary collapse
-
#encoding ⇒ Object
The encoding used for this stream.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(encoding = UTF8) ⇒ Stream
constructor
Create a new Psych::Nodes::Stream node with an
encoding
that defaults to Psych::Nodes::Stream::UTF8.
Methods inherited from Node
Constructor Details
Instance Attribute Details
#encoding ⇒ Object
The encoding used for this stream
25 26 27 |
# File 'lib/psych/nodes/stream.rb', line 25 def encoding @encoding end |