Class: JSONAPI::Consumer::ValueFormatter

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

Direct Known Subclasses

DefaultValueFormatter, IdValueFormatter

Class Method Summary collapse

Methods inherited from Formatter

formatter_for

Class Method Details

.format(raw_value) ⇒ Object



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

def format(raw_value)
  super(raw_value)
end

.unformat(value) ⇒ Object



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

def unformat(value)
  super(value)
end

.value_formatter_for(type) ⇒ Object



65
66
67
68
# File 'lib/jsonapi/consumer/formatter.rb', line 65

def value_formatter_for(type)
  formatter_name = "#{type.to_s.camelize}Value"
  formatter_for(formatter_name)
end