Skip to content

Instantly share code, notes, and snippets.

View mhupman's full-sized avatar

Matthew Hupman mhupman

  • Yext
  • United States
View GitHub Profile
# Let's face it. Ruby's Hash#to_s output isn't very useful.
# Here's a draft for a better version.
class Hash
def to_s
keys.inject([]) do |a, key|
a << "#{key}: #{fetch(key)}"
end.join(', ')
end
end