This class represents a YAML Scalar.
This node type is a terminal node and should not have any children.
Methods
- N
Constants
| ANY | = | 0 |
Any style scalar, the emitter chooses |
||
| PLAIN | = | 1 |
Plain scalar style |
||
| SINGLE_QUOTED | = | 2 |
Single quoted style |
||
| DOUBLE_QUOTED | = | 3 |
Double quoted style |
||
| LITERAL | = | 4 |
Literal style |
||
| FOLDED | = | 5 |
Folded style |
||
Attributes
| [RW] | anchor | The anchor value (if there is one) |
| [RW] | plain | Is this a plain scalar? |
| [RW] | quoted | Is this scalar quoted? |
| [RW] | style | The style of this scalar |
| [RW] | tag | The tag value (if there is one) |
| [RW] | value | The scalar value |
Class Public methods
new(value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY)
Link
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
See also Psych::Handler#scalar