RLML::Tree (Class)

In: rlml.rb
Parent: Array

Tree is the general class containing a RLML TreeParser tree.

Methods

==   children   inspect   new   to_s  

Attributes

encoding  [R] 
name  [R] 

Public Class methods

Create a new Tree called name. You may specify a different encoding, and initial children.

Public Instance methods

Equality—Two Trees are equal if they have the same name, contain the same number of children and if each child is equal to (according to Object#==) the corresponding child in the other array.

Return the children of the tree. Alternatively, you may as well just handle the tree as if it was an array of children.

Returns a string containing a human-readable representation of the tree.

Return a string containing the RLML representation of the tree. Generally:

  TreeParser.new.parse(tree.to_s) == tree    #=> true

If encoding is given, the string is re-encoded as specified.

[Validate]