lib/awrence/methods.rb
# Recursively converts Rubyish snake_case hash keys to CamelCase JSON-style
# hash keys suitable for use with a JSON API.
#
Recursively converts Rubyish snake_case hash keys to CamelCase JSON-style
hash keys suitable for use with a JSON API.
Recursively converts Rubyish snake_case hash keys to CamelCase JSON - style hash keys suitable for use with a JSON API .
def to_camel_keys(value = self)
      case value
        when Array
          value.map { |v| to_camel_keys(v) }
        when Hash
          Hash[value.map { |k, v| [camelize_key(k), to_camel_keys(v)] }]
        else
          value
      end
    end
def to_camel_keys ( value = self ) case value when Array value . map { | v | to_camel_keys ( v ) } when Hash Hash [ value . map { | k , v | [ camelize_key ( k ) , to_camel_keys ( v ) ] } ] else value end end
Recursively converts Rubyish snake_case hash keys to CamelCase JSON-style
hash keys suitable for use with a JSON API.
Recursively converts Rubyish snake_case hash keys to CamelCase JSON - style hash keys suitable for use with a JSON API .
value
<not_specific>