Skip to content

Instantly share code, notes, and snippets.

@tjackiw
Created December 18, 2012 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjackiw/4333221 to your computer and use it in GitHub Desktop.
Save tjackiw/4333221 to your computer and use it in GitHub Desktop.
Using a Graph Database with Ruby. Part II: Integration
def all_friends_to(user)
neo_node.all_simple_paths_to(user.neo_node).incoming(:friends).depth(5).nodes.each do |node|
puts node.map{|n| n.name }.join(' => ')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment