Class: ECCSV::FieldNode

Inherits:
ParentNode show all
Defined in:
lib/eccsv/node.rb

Instance Attribute Summary

Attributes inherited from Node

#col, #line, #token

Instance Method Summary collapse

Methods inherited from ParentNode

#initialize

Methods inherited from Node

#initialize

Constructor Details

This class inherits a constructor from ECCSV::ParentNode

Instance Method Details

#valueObject



32
33
34
35
36
37
38
39
40
# File 'lib/eccsv/node.rb', line 32

def value
  @value ||=
    if @children[0].token == :TEXT
      @children[0].value
    else
      # quoted text
      @children[1].value
    end
end