Class: Shax::Node

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#kidsObject

Returns the value of attribute kids


5
6
7
# File 'lib/shax.rb', line 5

def kids
  @kids
end

#parentObject

Returns the value of attribute parent


5
6
7
# File 'lib/shax.rb', line 5

def parent
  @parent
end

#tagObject

Returns the value of attribute tag


5
6
7
# File 'lib/shax.rb', line 5

def tag
  @tag
end

#valObject

Returns the value of attribute val


5
6
7
# File 'lib/shax.rb', line 5

def val
  @val
end