Class: Psych::Nodes::Stream
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Node
|
|
Instance Chain:
self,
Node,
Enumerable
|
|
Inherits: |
Psych::Nodes::Node
|
Defined in: | ext/psych/lib/psych/nodes/stream.rb |
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 Stream
node is Document.
Constant Summary
-
ANY =
Any encoding
Psych::Parser::ANY
-
UTF16BE =
UTF-16BE encoding
Psych::Parser::UTF16BE
-
UTF16LE =
UTF-16LE encoding
Psych::Parser::UTF16LE
-
UTF8 =
UTF-8 encoding
Psych::Parser::UTF8
Class Method Summary
- .new(encoding = UTF8) ⇒ Stream constructor
Node - Inherited
Instance Attribute Summary
Instance Method Summary
Node - Inherited
#each | Iterate over each node in the tree. |
#to_ruby | Convert this node to Ruby. |
#to_yaml | |
#transform | Alias for Node#to_ruby. |
#yaml | Convert this node to YAML. |
Constructor Details
.new(encoding = UTF8) ⇒ Stream
Create a new Stream
node with an #encoding that defaults to UTF8.
See also Handler#start_stream
Instance Attribute Details
#encoding (rw)
The encoding used for this stream
# File 'ext/psych/lib/psych/nodes/stream.rb', line 25
attr_accessor :encoding