lib/rtf/node.rb
def previous_node
         peer = nil
         if !parent.nil? and parent.respond_to?(:children)
            index = parent.children.index(self)
            peer  = index > 0 ? parent.children[index - 1] : nil
         end
         peer
      end
def previous_node
         peer = nil
         if !parent.nil? and parent.respond_to?(:children)
            index = parent.children.index(self)
            peer  = index > 0 ? parent.children[index - 1] : nil
         end
         peer
      end
Constructor for the Node class.

 ==== Parameters
 parent::  A reference to the Node that owns the new Node. May be nil
           to indicate a base or root node.
 This method retrieves a Node objects previous peer node, returning nil
 if the Node has no previous peer.