Hi, I''m wondering if there is an equivalent to Data::Dumper in perl, in ruby/rails. James
I think you''re looking for debug() - api.rubyonrails.com classes/ActionView/Helpers/DebugHelper.html#M000339 George On Aug 4, 2005, at 12:32 PM, yoorobot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Hi, > > I''m wondering if there is an equivalent to Data::Dumper in perl, in > ruby/rails. > > James
On Thu, Aug 04, 2005, yoorobot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I''m wondering if there is an equivalent to Data::Dumper in perl, in > ruby/rails.I usually use inspect(), but I''m pretty sure there''s at least a few more ways to do it ;) irb(main):001:0> foo = [ :one => [2,3], :four => 5, :six => [:seven => :eight] ] irb(main):002:0> foo.inspect => "[{:one=>[2, 3], :four=>5, :six=>[{:seven=>:eight}]}]" Ben