On a recent Ruby Tapas episode (my favourite screencast service), Avdi
introduced the Awesome Print gem. It’s basically the built in pp
on
steroids. You require the gem then use it via ap
method call to awesome print
something to the screen. However, my favourite way to use Awesome Print is to
make it the default output in Pry.
To get this behaviour, you’ll need to gem install awesome_print
, then modify
your ~/.pryrc
.
ruby
require 'awesome_print'
AwesomePrint.pry!
Give it a whirl, I promise you’ll never go back. Also, subscribe to RubyTapas for more Ruby awesomeness!