Method: Mappru::Ext::HashExt#sort_pair
- Defined in:
- lib/mappru/ext/hash_ext.rb
#sort_pair ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/mappru/ext/hash_ext.rb', line 3 def sort_pair new_hash = {} self.sort_by(&:to_s).each do |k, v| new_hash[k] = v end new_hash end |