Forum: Ruby on Rails ruby data dumper?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2da252cc1d2fb3701126171831b50a65?d=identicon&s=25 Dave Coleman (pezdude)
on 2006-03-15 03:17
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 :-)
30269682335f1fb247d71969fa715b5e?d=identicon&s=25 Roberto Saccon (rsaccon)
on 2006-03-15 03:38
(Received via mailing list)
go to the console: ruby script/console

and type: puts YourObject.to_yaml
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-03-15 05:25
(Received via mailing list)
require 'pp'

pp @thing

--
-- Tom Mornini
This topic is locked and can not be replied to.