Class: Flatito::YAMLWithLineNumber::TreeBuilder

Inherits:
Psych::TreeBuilder
  • Object
show all
Defined in:
lib/flatito/yaml_with_line_number.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parserObject

Returns the value of attribute parser.



47
48
49
# File 'lib/flatito/yaml_with_line_number.rb', line 47

def parser
  @parser
end

Instance Method Details

#scalar(*args) ⇒ Object



49
50
51
52
53
# File 'lib/flatito/yaml_with_line_number.rb', line 49

def scalar(*args)
  node = NodesScalar.new(*args, parser.mark.line)
  @last.children << node
  node
end