Class: DasherizedKeyFormatter

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

Class Method Summary collapse

Methods inherited from JSONAPI::Formatter

cached, formatter_for, uncached

Class Method Details

.format(_key) ⇒ Object



113
114
115
# File 'lib/jsonapi/formatter.rb', line 113

def format(_key)
  super.underscore.dasherize
end

.unformat(formatted_key) ⇒ Object



117
118
119
# File 'lib/jsonapi/formatter.rb', line 117

def unformat(formatted_key)
  formatted_key.to_s.underscore
end