Skip to content

Instantly share code, notes, and snippets.

@Aerlinger
Aerlinger / gist:6350064
Created August 27, 2013 05:55
Pretty print a hash in ruby
def pretty_hash(hash_obj)
hash_obj.inject("\n") { |collection, item| collection << " #{item[0]}: #{item[1]},\n" }
end