Class Ariel::Node
In: lib/ariel/node.rb
Parent: Object

A generic Node object. As an end user, you have no need to use this. All children are stored in a hash. id and type are undefined so they can be used freely as part of a Node::Structure

Methods

Attributes

children  [RW] 
node_name  [RW] 
parent  [RW] 

Public Class methods

If the name is a string, it’s converted to a symbol. If not it’s just stored as is.

Public Instance methods

Given a Node object and a name, adds a child to the array of children, setting its parent as the current node, as well as creating an accessor method matching that name.

Yields each descendant node. If passed true will also yield itself.

[Validate]