lib/awrence/methods.rb
# Recursively converts Rubyish snake_case hash keys to camelBack JSON-style
# hash keys suitable for use with a JSON API.
#
Recursively converts Rubyish snake_case hash keys to camelBack JSON-style
hash keys suitable for use with a JSON API.
Recursively converts Rubyish snake_case hash keys to camelBack JSON - style hash keys suitable for use with a JSON API .
def camelize_key(k, first_upper = true)
      if k.is_a? Symbol
        camelize(k.to_s, first_upper).to_sym
      elsif k.is_a? String
        camelize(k, first_upper)
      else
        k 
      end
    end
def camelize_key ( k , first_upper = true ) if k . is_a? Symbol camelize ( k . to_s , first_upper ) . to_sym elsif k . is_a? String camelize ( k , first_upper ) else k end end
Recursively converts Rubyish snake_case hash keys to camelBack JSON-style
hash keys suitable for use with a JSON API.
Recursively converts Rubyish snake_case hash keys to camelBack JSON - style hash keys suitable for use with a JSON API .
# Awrence can't camelize anything except strings and symbols
k
<not_specific>
first_upper
<not_specific>