Author: avin

  • Awesome Print your IRB & Rails Console

    Awesome Print is a Ruby gem that prints prettified objects to the console. To avoid having to prepend ap to all your console commands, set it as the default formatter in IRB and Rails by adding the following to your ~/.irbrc:

    require 'awesome_print'
    IRB::Irb.class_eval do
      def output_value
        ap @context.last_value
      end
    end

    Obviously, Awesome Print first needs to be installed: gem install awesome_print

    UPDATE: Awesome Print now includes a method to make the integration process easier.

    require 'awesome_print'
    AwesomePrint.irb!
  • Hello world!

    So I’ve been toying around with the idea of starting a blog and after prodding from my brother and probably more so, finally plonking down some cash for a domain, that was all the encouragement I needed.