Module: ApiAuth::Helpers

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#b64_encode(string) ⇒ Object



5
6
7
# File 'lib/api_auth/helpers.rb', line 5

def b64_encode(string)
  Base64.strict_encode64(string)
end

#capitalize_keys(hsh) ⇒ Object

Capitalizes the keys of a hash



10
11
12
13
14
# File 'lib/api_auth/helpers.rb', line 10

def capitalize_keys(hsh)
  capitalized_hash = {}
  hsh.each_pair {|k,v| capitalized_hash[k.to_s.upcase] = v }
  capitalized_hash
end