Class: Shax::Node
- Inherits:
-
Object
- Object
- Shax::Node
- Defined in:
- lib/shax.rb
Instance Attribute Summary collapse
-
#kids ⇒ Object
Returns the value of attribute kids.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#val ⇒ Object
Returns the value of attribute val.
Instance Method Summary collapse
-
#initialize(tag = nil, parent = nil, val = nil) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(tag = nil, parent = nil, val = nil) ⇒ Node
Returns a new instance of Node.
7 8 9 10 11 12 |
# File 'lib/shax.rb', line 7 def initialize(tag=nil, parent=nil, val=nil) @tag = tag @parent = parent @val = val @kids = [] end |
Instance Attribute Details
#kids ⇒ Object
Returns the value of attribute kids
5 6 7 |
# File 'lib/shax.rb', line 5 def kids @kids end |
#parent ⇒ Object
Returns the value of attribute parent
5 6 7 |
# File 'lib/shax.rb', line 5 def parent @parent end |
#tag ⇒ Object
Returns the value of attribute tag
5 6 7 |
# File 'lib/shax.rb', line 5 def tag @tag end |
#val ⇒ Object
Returns the value of attribute val
5 6 7 |
# File 'lib/shax.rb', line 5 def val @val end |