Idea would be to write contents of some objects into some file in pretty
inspection format.
How is it possible in Ruby to get pretty inspection of an object without
printing it to stdout?
One possibility would be to play with stdout redirection while using
‘pp’, but that’s not what i’m looking for. Is there any easy way to do
it or should i start monkey-patching ‘pp’ to add that feature?
Idea would be to write contents of some objects into some file in pretty
inspection format.
How is it possible in Ruby to get pretty inspection of an object without
printing it to stdout?
One possibility would be to play with stdout redirection while using
‘pp’, but that’s not what i’m looking for. Is there any easy way to do
it or should i start monkey-patching ‘pp’ to add that feature?
Why monkey-patch? Look at source of pp.rb, and you’ll see it takes an
optional argument, out=$>