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
#children, #end_column, #end_line, #start_column, #start_line, #tag
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. - #stream? ⇒ Boolean
Methods inherited from Node
#alias?, #document?, #each, #mapping?, #scalar?, #sequence?, #to_ruby, #yaml
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 |
Instance Method Details
#stream? ⇒ Boolean
37 |
# File 'lib/psych/nodes/stream.rb', line 37 def stream?; true; end |