Skip to content

Commit

Permalink
Minor RDoc stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Jun 14, 2009
1 parent 46eae24 commit 5e3d3ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.rdoc
Expand Up @@ -88,6 +88,7 @@ Example of setting properties
node[:name] = 'foo'
node[:age] = 123
node[:hungry] = false
node[4] = 3.14

Example of getting properties

Expand All @@ -97,7 +98,7 @@ Example of creating a relationship

node1 = Neo4j::Node.new
node2 = Neo4j::Node.new
node1.relationships.outgoing(:friends) << node2
node1.relationships.outgoing(:friends) << node2 # connects node1 to node2 with relationship type 'friends'

Example of getting relationships

Expand All @@ -107,9 +108,10 @@ Example of getting relationships
# The nodes method on the relationships returns the nodes instead.
node1.relationships.nodes.include?(node2) # => true

node1.relationships.first # => the first relationship this node1 has which is between node1 and node2
node1.relationships.nodes.first # => node2
node1.relationships.outgoing(:friends).first # => the first relationship of type :friends
node1.relationships.first # => the first relationship this node1 has which is between node1 and node2 of any type
node1.relationships.nodes.first # => node2 first node of any relationship type
node1.relationships.incoming(:friends).nodes.first # => node1 first node of relationship type 'friends'
node2.relationships.incoming(:friends).first # => a relationship object between node1 and node2

Example of setting properties on relationships

Expand Down

0 comments on commit 5e3d3ea

Please sign in to comment.