Class: ECCSV::DelimRecordsNode

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



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/eccsv/node.rb', line 74

def value
  if @value.nil?
    if @children.empty?
      @value = []
    else
      @value = @children[0].value
      val = @children[1].value
      if !val.empty?
        @value += [val]
      end
    end
  end
  @value
end