Class: Rgo::Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, name, children = []) ⇒ Node

Returns a new instance of Node.



5
6
7
8
9
# File 'lib/rgo/node.rb', line 5

def initialize(type, name, children = [])
  @type = type
  @name = name
  @children = children
end

Instance Attribute Details

#childrenObject

Returns the value of attribute children.



3
4
5
# File 'lib/rgo/node.rb', line 3

def children
  @children
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/rgo/node.rb', line 3

def name
  @name
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/rgo/node.rb', line 3

def type
  @type
end