In: |
rlml.rb
|
Parent: | Array |
Tree is the general class containing a RLML TreeParser tree.
encoding | [R] | |
name | [R] |
Create a new Tree called name. You may specify a different encoding, and initial children.
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.
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.