Class: CamelizedKeyFormatter

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

Class Method Summary collapse

Methods inherited from JSONAPI::Formatter

#formatter_for

Class Method Details

.format(key) ⇒ Object



75
76
77
# File 'lib/jsonapi/formatter.rb', line 75

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

.unformat(formatted_key) ⇒ Object



79
80
81
# File 'lib/jsonapi/formatter.rb', line 79

def unformat(formatted_key)
  formatted_key.to_s.underscore.to_sym
end