Skip to content

Commit

Permalink
Added Rdocs for for traverse method. [#19 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasronge committed Jan 14, 2009
1 parent 14f2e95 commit 0d81b54
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.rdoc
Expand Up @@ -627,10 +627,10 @@ Example of has_one: A person can have at most one Address
end

In the example above we have Neo4j.rb will generate the following methods
* in Person, the method ''address='' and ''address''
* in Address, the traversal method ''people'' for traversing incomming relationships from the Person node.
* in Person, the method ''address='' and ''address''
* in Address, the traversal method ''people'' for traversing incomming relationships from the Person node.

Example of usage
Example of usage:

p = Person.new
p.address = Address.new
Expand Down Expand Up @@ -767,7 +767,8 @@ Notice there is also a otherway of finding nodes, see the Neo4j::NodeMixin#trave
=== Traversing Nodes

The Neo4j::NodeMixin also has a method for traversing nodes instead of relationships.
It works in a similar way to the Neo4j::NodeMixin#relations method.
It works in a similar way to the Neo4j::NodeMixin#relations method but also allows
traversing the node space of arbitrary depth.

Example:

Expand All @@ -779,7 +780,7 @@ Unlike the Neo4j::NodeMixin#relations the type(s) of relationships must be speci
incoming, outgoing or both method. Those three methods can take one or more relationship types parameters
if more then one type of relationship should be traversed.

The Neo4j::NodeMixin#traverse method it allows you to traverse nodes of any depth with a filter.
The Neo4j::NodeMixin#traverse method allows you to traverse the node space of any depth with a filter, see below.

==== Traversing Nodes of Arbitrary Depth

Expand All @@ -791,7 +792,7 @@ Example:
me.traverse.incoming(:friends).depth(4).each {} # => people with a friend relationship to me


==== Traversing Nodes with filter
==== Traversing Nodes With a Filter

It's possible to filter which nodes should be returned from the traverser object by
using the filter method.
Expand Down

0 comments on commit 0d81b54

Please sign in to comment.