Class: JSONAPI::Consumer::DasherizedKeyFormatter

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



89
90
91
# File 'lib/jsonapi/consumer/formatter.rb', line 89

def format(key)
  super.dasherize
end

.unformat(formatted_key) ⇒ Object



93
94
95
# File 'lib/jsonapi/consumer/formatter.rb', line 93

def unformat(formatted_key)
  formatted_key.to_s.underscore
end