Class: Rgo::Node
- Inherits:
-
Object
- Object
- Rgo::Node
- Defined in:
- lib/rgo/node.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, name, children = []) ⇒ Node
constructor
A new instance of Node.
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
#children ⇒ Object
Returns the value of attribute children.
3 4 5 |
# File 'lib/rgo/node.rb', line 3 def children @children end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rgo/node.rb', line 3 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/rgo/node.rb', line 3 def type @type end |