Joel VanderWerf
5/26/2008 7:40:00 PM
Martin Martinos wrote:
> I there a way to configure IRB so that it always display the result of a
> IRB command in YAML or PP format.
Put this in your .irbrc and play around a little:
require 'yaml'
class IRB::Irb
def output_value
if @context.inspect?
printf @context.return_format, @context.last_value.to_yaml
else
printf @context.return_format, @context.last_value
end
end
end
--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407