Module: Oink::HashUtils

Defined in:
lib/oink/utils/hash_utils.rb

Class Method Summary collapse

Class Method Details

.to_sorted_array(hsh) ⇒ Object



4
5
6
# File 'lib/oink/utils/hash_utils.rb', line 4

def self.to_sorted_array(hsh)
  hsh.sort{ |a, b| b[1] <=>a [1] }.collect { |k,v| "#{k}: #{v}" }
end