Class: ECCSV::ParentNode

Inherits:
Node
  • Object
show all
Defined in:
lib/eccsv/node.rb

Instance Attribute Summary

Attributes inherited from Node

#col, #line, #token, #value

Instance Method Summary collapse

Constructor Details

#initialize(children = [], line = nil, col = nil) ⇒ ParentNode

Returns a new instance of ParentNode.



14
15
16
17
18
19
20
21
22
# File 'lib/eccsv/node.rb', line 14

def initialize(children = [], line = nil, col = nil)
  last = children.last
  if last && last.is_a?(Node)
    line = last.line
    col = last.col
  end
  super(nil, nil, line, col)
  @children = children
end