Class: Johnson::Nodes::List

Inherits:
Node
  • Object
show all
Defined in:
lib/johnson/nodes/list.rb

Overview

This is an abstract node used for nodes of list type see SourceElements

Instance Attribute Summary

Attributes inherited from Node

#column, #line, #value

Instance Method Summary collapse

Methods inherited from Node

#each, #to_dot, #to_ecma, #to_s, #to_sexp

Methods included from Visitable

#accept

Constructor Details

#initialize(line, column, value = []) ⇒ List

Returns a new instance of List.



18
19
20
# File 'lib/johnson/nodes/list.rb', line 18

def initialize(line, column, value = [])
  super
end

Instance Method Details

#<<(obj) ⇒ Object



22
23
24
# File 'lib/johnson/nodes/list.rb', line 22

def <<(obj)
  self.value << obj
end