def add_child( *children ) options = children[0].is_a( 'Hash' ) ? children.shift : Hash.new; if children.any? { |node| !node.is_a( 'Tree' ) }: raise ArgumentError "Non-Tree argument found in add_child()" end # Resume regular processing here end