Hirb- Visualizing Trees In Irb
This post shows how to visualize trees in irb like this:
Numeric
|-- Float
|-- Integer
| |-- Bignum
| `-- Fixnum
|-- Date::Infinity
`-- Rational
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
This post shows how to visualize trees in irb like this:
Numeric
|-- Float
|-- Integer
| |-- Bignum
| `-- Fixnum
|-- Date::Infinity
`-- Rational
Comments
I don’t usually like tall posts here so I edit them down, but this is so illustrative - bravo! :)
PeterCooper: maybe you can put the tree in between <pre/> tags?
That’s supposed to read: “< p r e / > tags”. Whoops.
In theory code tags will do that with RF’s system. I think. I’ll try ;-)
Post a comment