ruby: print methods for an object at run time in a nicely formatted and colorized way

Angelegt von micha Fri, 08 Jul 2011 13:43:00 GMT

I just found a useful helper snippet to pretty print ruby object methods:

http://snippets.dzone.com/posts/show/2916

 

Note: In ruby 1.9, rjust and ljust are not defined anymore for Symbols. So you need to replace item[0].rjust with item[0].to_s.rjust and for ljust respectively.

ruby: print methods for an object at run time in a nicely formatted and colorized way

Angelegt von micha Wed, 08 Jun 2011 12:24:00 GMT

I just found a useful helper snippet to pretty print ruby object methods:

http://snippets.dzone.com/posts/show/2916