Class: Psych::Nodes::Scalar
| 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/scalar.rb | 
Overview
This class represents a YAML Scalar.
This node type is a terminal node and should not have any children.
Constant Summary
- 
    ANY =
    # File 'ext/psych/lib/psych/nodes/scalar.rb', line 10Any style scalar, the emitter chooses 0
- 
    DOUBLE_QUOTED =
    # File 'ext/psych/lib/psych/nodes/scalar.rb', line 19Double quoted style 3
- 
    FOLDED =
    # File 'ext/psych/lib/psych/nodes/scalar.rb', line 25Folded style 5
- 
    LITERAL =
    # File 'ext/psych/lib/psych/nodes/scalar.rb', line 22Literal style 4
- 
    PLAIN =
    # File 'ext/psych/lib/psych/nodes/scalar.rb', line 13Plain scalar style 1
- 
    SINGLE_QUOTED =
    # File 'ext/psych/lib/psych/nodes/scalar.rb', line 16Single quoted style 2
Class Method Summary
- 
    
      .new(value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY)  ⇒ Scalar 
    
    constructor
    Create a new Scalarobject.
Node - Inherited
Instance Attribute Summary
- 
    
      #anchor  
    
    rw
    The anchor value (if there is one). 
- 
    
      #plain  
    
    rw
    Is this a plain scalar? 
- 
    
      #quoted  
    
    rw
    Is this scalar quoted? 
- 
    
      #style  
    
    rw
    The style of this scalar. 
- 
    
      #tag  
    
    rw
    The tag value (if there is one). 
- 
    
      #value  
    
    rw
    The scalar value. 
Node - Inherited
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(value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY)  ⇒ Scalar 
  
Instance Attribute Details
#anchor (rw)
The anchor value (if there is one)
# File 'ext/psych/lib/psych/nodes/scalar.rb', line 31
attr_accessor :anchor
#plain (rw)
Is this a plain scalar?
# File 'ext/psych/lib/psych/nodes/scalar.rb', line 37
attr_accessor :plain
#quoted (rw)
Is this scalar quoted?
# File 'ext/psych/lib/psych/nodes/scalar.rb', line 40
attr_accessor :quoted
#style (rw)
The style of this scalar
# File 'ext/psych/lib/psych/nodes/scalar.rb', line 43
attr_accessor :style
#tag (rw)
The tag value (if there is one)
# File 'ext/psych/lib/psych/nodes/scalar.rb', line 34
attr_accessor :tag
#value (rw)
The scalar value
# File 'ext/psych/lib/psych/nodes/scalar.rb', line 28
attr_accessor :value