In Files

  • psych/lib/psych/nodes/stream.rb

Methods

Psych::Nodes::Stream

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.

Constants

ANY

Any encoding

UTF16BE

UTF-16BE encoding

UTF16LE

UTF-16LE encoding

UTF8

UTF-8 encoding

Attributes

encoding[RW]

The encoding used for this stream

Public Class Methods

new(encoding = UTF8) click to toggle source

Create a new Psych::Nodes::Stream node with an encoding that defaults to Psych::Nodes::Stream::UTF8.

See also Psych::Handler#start_stream

 
               # File psych/lib/psych/nodes/stream.rb, line 31
def initialize encoding = UTF8
  super()
  @encoding = encoding
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus