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



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

def format(key)
  super.dasherize
end

.unformat(formatted_key) ⇒ Object



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

def unformat(formatted_key)
  formatted_key.to_s.underscore
end