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 :-) -- Posted via http://www.ruby-forum.com/.
go to the console: ruby script/console and type: puts YourObject.to_yaml On 3/14/06, David C. <dave@pezians.com> wrote:> > > 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 :-) > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Roberto Saccon - http://rsaccon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060315/d40a4f0e/attachment-0001.html
require ''pp'' pp @thing -- -- Tom Mornini On Mar 14, 2006, at 6:17 PM, David C. wrote:> > 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 :-) > > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails