Ruby data dumper?


#1

Coming from the perl world to ruby, I was wondering if there was
anything like data::dumper perl module for ruby/rails?

@thing.inspect or dump(@thing) works, but isn't formatted all as 

nice.

thx :slight_smile:


#2

go to the console: ruby script/console

and type: puts YourObject.to_yaml


#3

require ‘pp’

pp @thing

–
– Tom M.