PryAaAncestors
PryAaAncestors is 🔗pry plugin. Show the class hierarchy that is ascii-art format.
% pry
[1] pry(main)> require 'prime'
=> true
[2] pry(main)> aa_ancestors Prime
-----------------
| BasicObject |
-----------------
|
-----------------
| Kernel |
-----------------
|
-----------------
|PP::ObjectMixin|
-----------------
|
-----------------
| Object |
-----------------
|
-----------------
| Enumerable |
-----------------
|
-----------------
| Prime |
-----------------
☁️⬇️ Installation
Add this line to your application's Gemfile:
gem 'pry-aa_ancestors'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pry-aa_ancestors
📜 Usage
☑️ Confirm Installation
$ pry --plugins
Installed Plugins:
--
aa_ancestors Show the class hierarchy that is Ascii-Art format.
📕 Help
$ pry
[1] pry(main)> help aa_ancestors
Show the class hierarchy that is Ascii-Art format.
-h, --help Show this message.
👴👨👦👶 Standard class ( String ) hierarchy
$ pry
[2] pry(main)> aa_ancestors String
-----------------
| BasicObject |
-----------------
|
-----------------
| Kernel |
-----------------
|
-----------------
|PP::ObjectMixin|
-----------------
|
-----------------
| Object |
-----------------
|
-----------------
| Comparable |
-----------------
|
-----------------
| String |
-----------------
👵👩👧👶 User defined class ( Child ) hierarchy
$ pry
[1] pry(main)> module Extendable
[1] pry(main)* end
=> nil
[2] pry(main)> class Parent
[2] pry(main)* end d
=> nil
[3] pry(main)> class Child < Parent
[3] pry(main)* include Extendable
[3] pry(main)* end d
=> Child
[4] pry(main)> aa_ancestors Child
-----------------
| BasicObject |
-----------------
|
-----------------
| Kernel |
-----------------
|
-----------------
|PP::ObjectMixin|
-----------------
|
-----------------
| Object |
-----------------
|
-----------------
| Parent |
-----------------
|
-----------------
| Extendable |
-----------------
|
-----------------
| Child |
-----------------
👬 Contributing 👭
- Fork it ( https://github.com/tbpgr/pry-aa_ancestors/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request