abstruct class of node of document tree
# File lib/rd/element.rb, line 10 def initialize @parent = nil end
# File lib/rd/element.rb, line 19 def inspect c = children.collect{|i| indent2(i.inspect)}.join("\n") "<#{self.class.name}>" + (c.empty? ? "" : "\n") + c end
# File lib/rd/element.rb, line 14 def tree raise RuntimeError, "#{self} doesn't have a parent." unless @parent @parent.tree end