Class: RbYAML::ScalarNode

Inherits:
Node show all
Defined in:
lib/rbyaml/nodes.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#end_mark, #start_mark, #tag, #value

Instance Method Summary collapse

Methods inherited from Node

#__is_collection, #__is_mapping, #__is_sequence, #hash, #to_s

Constructor Details

#initialize(tag, value, start_mark = nil, end_mark = nil, style = nil) ⇒ ScalarNode

Returns a new instance of ScalarNode.



25
26
27
28
# File 'lib/rbyaml/nodes.rb', line 25

def initialize(tag, value,start_mark=nil,end_mark=nil,style=nil)
  super(tag,value,start_mark,end_mark)
  @style = style
end

Instance Attribute Details

#styleObject

Returns the value of attribute style.



23
24
25
# File 'lib/rbyaml/nodes.rb', line 23

def style
  @style
end

Instance Method Details

#__is_scalarObject



29
# File 'lib/rbyaml/nodes.rb', line 29

def __is_scalar; true; end

#tidObject



19
20
21
# File 'lib/rbyaml/nodes.rb', line 19

def tid
  "scalar"
end