Class: DasherizedKeyFormatter

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



87
88
89
# File 'lib/jsonapi/formatter.rb', line 87

def format(key)
  super.dasherize
end

.unformat(formatted_key) ⇒ Object



91
92
93
# File 'lib/jsonapi/formatter.rb', line 91

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