class GrapeTokenAuth::Utility
Public Class Methods
find_with_indifference(hash, key)
click to toggle source
# File lib/grape_token_auth/utility.rb, line 4 def self.find_with_indifference(hash, key) if hash.key?(key.to_sym) return hash[key.to_sym] elsif hash.key?(key.to_s) return hash[key.to_s] end nil end
humanize(snake_cased)
click to toggle source
# File lib/grape_token_auth/utility.rb, line 13 def self.humanize(snake_cased) snake_cased.to_s.split('_').collect(&:capitalize).join end