Class: ManaMana::TDSL::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/manamana/tdsl/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Node.



8
9
10
11
# File 'lib/manamana/tdsl/nodes.rb', line 8

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

Instance Attribute Details

#childrenObject (readonly)

Returns the value of attribute children.



6
7
8
# File 'lib/manamana/tdsl/nodes.rb', line 6

def children
  @children
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/manamana/tdsl/nodes.rb', line 6

def name
  @name
end

Instance Method Details

#==(other_node) ⇒ Object



13
14
15
# File 'lib/manamana/tdsl/nodes.rb', line 13

def ==(other_node)
  name == other_node.name && children == other_node.children
end