0.0
No commit activity in last 3 years
No release in over 3 years
Make search of objects parents/childrem/brothers
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

MyAncestry

Make search of objects parents/childrem/brothers .....

Installation

Add this line to your application's Gemfile:

gem 'my_ancestry'

And then execute:

$ bundle

Or install it yourself as:

$ gem install my_ancestry

Usage

list = [ { id:1, name: "couto", ancestry:nil }, { id:2, name: "teste", ancestry:"000001" }, { id:3, name: "teste2", ancestry:"0001" } ]

result = MyAncestry.new(list,{:id=> :id, :ancestry_id => :ancestry})

brothers = result.brothers_of(2)

childrem = result.childrem_of(1)

parent = result.parent_of(3) .....

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
  6. Execure the "THE BEER-WARE LICENSE".

#tnks for Digaoddc (https://github.com/digaoddc/)