This class represents a YAML Scalar.
This node type is a terminal node and should not have any children.
Any style scalar, the emitter chooses
Double quoted style
Folded style
Literal style
Plain scalar style
Single quoted style
Create a new Psych::Nodes::Scalar object.
value
is the string value of the scalar anchor
is
an associated anchor or nil tag
is an associated tag or nil
plain
is a boolean value quoted
is a boolean
value style
is an integer idicating the string style
See also Psych::Handler#scalar
# File psych/lib/psych/nodes/scalar.rb, line 57 def initialize value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY @value = value @anchor = anchor @tag = tag @plain = plain @quoted = quoted @style = style 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 see Improve the docs, or visit Documenting-ruby.org.