Class: JSONAPI::Consumer::CamelizedKeyFormatter

Inherits:
KeyFormatter show all
Defined in:
lib/jsonapi/consumer/formatter.rb

Class Method Summary collapse

Methods inherited from KeyFormatter

format_keys

Methods inherited from Formatter

formatter_for

Class Method Details

.format(key) ⇒ Object



77
78
79
# File 'lib/jsonapi/consumer/formatter.rb', line 77

def format(key)
  super.camelize(:lower)
end

.unformat(formatted_key) ⇒ Object



81
82
83
# File 'lib/jsonapi/consumer/formatter.rb', line 81

def unformat(formatted_key)
  formatted_key.to_s.underscore
end