I am trying to pretty print a hash to a file.
I tried unix redirects [added different flags to it incrementally] :
`echo #{pp mymap} | tee summary.out
require 'pp' class File def pp(*objs) objs.each {|obj| PP.pp(obj, self) } objs.size <= 1 ? objs.first : objs end end File.open('output','w') do |file| file.pp mymap end