class Hashify
Takes a hash and returns string of reverse order odd keys
Public Class Methods
call(hash)
click to toggle source
# File lib/primus.rb, line 7 def self.call(hash) raise 'This hash is empty' if hash.empty? array = hash.each_with_index.map { |(key), index| key.upcase if index.odd? }.compact array.sort.reverse.join('') end