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
The use of backticks here is perplexing since those are used for executing shell commands.
What you probably mean is:
File.open(@dir_+"/myfile.out",'w+') do |f|
f.write(pp(get_submap_from_final(all_mapping_file,final_map)))
end
The pp
method always writes to the console so you might see it and still have it written.