0.0
No commit activity in last 3 years
No release in over 3 years
like tree command for Ruby ancestors.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.0

Runtime

 Project Readme

ObjectTree

Build Status

ObjectTree is like tree command for Ruby ancestors.

Installation

$ gem install object_tree

Usage

require 'object_tree'

class A
end

class B < A
end

class C < B
end

puts ObjectTree.create(A)

output

<C> A
└───── <C> B
        └───── <C> C

more complex pattern

require 'object_tree'

module D
end

module E
end

class A
  include D
end

class B < A
end

class C < A
  include E
end

class F < B
  include E
end

puts ObjectTree.create(D)

output

<M> D
└───── <C> A
        ├───── <C> B
        │       └───── <M> E
        │               └───── <C> F
        └───── <M> E
                └───── <C> C

can use from terminal by using rotree command.

$ rotree Numeric

Ruby 2.3.3

<C> Numeric
├───── <C> Complex
├───── <C> Float
├───── <C> Integer
│       ├───── <C> Bignum
│       └───── <C> Fixnum
└───── <C> Rational

Ruby 2.4.0

<C> Numeric
├───── <C> Complex
├───── <C> Float
├───── <C> Integer
└───── <C> Rational

you can see unify Fixnum and Bignum into Integer from ruby 2.4.0

Contributing

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