Class: JsonApiClient::KeyFormatter

Inherits:
Formatter
  • Object
show all
Defined in:
lib/json_api_client/formatter.rb

Class Method Summary collapse

Methods inherited from Formatter

formatter_for

Class Method Details

.format(key) ⇒ Object



27
28
29
# File 'lib/json_api_client/formatter.rb', line 27

def format(key)
  super
end

.format_keys(hash) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/json_api_client/formatter.rb', line 31

def format_keys(hash)
  Hash[
    hash.map do |key, value|
      [format(key).to_sym, value]
    end
  ]
end

.unformat(formatted_key) ⇒ Object



39
40
41
# File 'lib/json_api_client/formatter.rb', line 39

def unformat(formatted_key)
  super
end