Class: JsonApiClient::ValueFormatter

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

Direct Known Subclasses

DefaultValueFormatter, IdValueFormatter

Class Method Summary collapse

Methods inherited from Formatter

formatter_for

Class Method Details

.format(raw_value) ⇒ Object


59
60
61
# File 'lib/json_api_client/formatter.rb', line 59

def format(raw_value)
  super(raw_value)
end

.unformat(value) ⇒ Object


63
64
65
# File 'lib/json_api_client/formatter.rb', line 63

def unformat(value)
  super(value)
end

.value_formatter_for(type) ⇒ Object


67
68
69
70
# File 'lib/json_api_client/formatter.rb', line 67

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