Class: ManaMana::RDSL::Node
- Inherits:
-
Object
- Object
- ManaMana::RDSL::Node
- Defined in:
- lib/manamana/rdsl/nodes.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other_node) ⇒ Object
-
#initialize(options = {}, children = []) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(options = {}, children = []) ⇒ Node
Returns a new instance of Node.
8 9 10 11 |
# File 'lib/manamana/rdsl/nodes.rb', line 8 def initialize(={}, children=[]) @children = children @name = [:value] || '' end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
6 7 8 |
# File 'lib/manamana/rdsl/nodes.rb', line 6 def children @children end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/manamana/rdsl/nodes.rb', line 6 def name @name end |
Instance Method Details
#==(other_node) ⇒ Object
13 14 15 |
# File 'lib/manamana/rdsl/nodes.rb', line 13 def ==(other_node) name == other_node.name && @children == other_node.children end |