Class: Hash
- Inherits:
-
Object
- Object
- Hash
- 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_s ⇒ Object
163 164 165 166 167 168 169 170 |
# File 'lib/rwikibot.rb', line 163 def to_s out = "{" self.each do |key, value| out += "#{key} => #{value}," end out = out.chop out += "}" end |