Class: JSONAPI::ValueFormatter

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

Direct Known Subclasses

DefaultValueFormatter, IdValueFormatter

Class Method Summary collapse

Methods inherited from Formatter

cached, formatter_for, uncached

Class Method Details

.format(raw_value) ⇒ Object



54
55
56
# File 'lib/jsonapi/formatter.rb', line 54

def format(raw_value)
  super(raw_value)
end

.unformat(value) ⇒ Object



58
59
60
# File 'lib/jsonapi/formatter.rb', line 58

def unformat(value)
  super(value)
end

.value_formatter_for(type) ⇒ Object



62
63
64
# File 'lib/jsonapi/formatter.rb', line 62

def value_formatter_for(type)
  "#{type.to_s.camelize}ValueFormatter".safe_constantize
end