Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/rwikibot.rb

Overview

I’m never happy with good enough, and when it comes to my hashes, I like to see the members of it. So I changed the hash to_s. Overriding method makes me happy.

Instance Method Summary collapse

Instance Method Details

#to_sObject



187
188
189
190
191
192
193
194
# File 'lib/rwikibot.rb', line 187

def to_s
  out = "{"
  self.each do |key, value|
    out += "#{key} => #{value},"
  end
  out = out.chop
  out += "}"
end