0.0
No commit activity in last 3 years
No release in over 3 years
Undirected graph implementation for Mongoid
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.3.1
~> 1.0.2
~> 0.7.0
~> 0.7.1
~> 2.10.0
~> 0.9.1
~> 0.8.1

Runtime

~> 1.6.2
~> 2.4.9
 Project Readme

Mongoid graph

Undirected graph implementation for Mongoid

Installation

Add this line to your application's Gemfile:

gem 'mongoid-graph'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mongoid-graph

Usage

  first_node = Node.new(node_index: 1)
  second_node = Node.new(node_index: 2)
  first_node.connect_to second_node
  first_node.save!
  second_node.save!
  Node.neighbours_of(first_node).size.should == 1

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request