GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - siman-man/object_tree: ObjectTree is like tree command for Ruby ancestors.

BranchesTags
Open more actions menu

Latest commit

 

History

57 Commits
57 Commits

Folders and files

NameName
Last commit message
Last commit date
exe
exe
 
 
lib
lib
 
 
spec
spec
 
 
.gitignore
.gitignore
 
 
.rspec
.rspec
 
 
.travis.yml
.travis.yml
 
 
Gemfile
Gemfile
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
object_tree.gemspec
object_tree.gemspec
 
 

Repository files navigation

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

About

ObjectTree is like tree command for Ruby ancestors.

Topics

gemruby

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.