Class: DefaultValueFormatter
- Inherits:
-
JSONAPI::ValueFormatter
- Object
- JSONAPI::Formatter
- JSONAPI::ValueFormatter
- DefaultValueFormatter
- Defined in:
- lib/jsonapi/formatter.rb
Class Method Summary collapse
Methods inherited from JSONAPI::ValueFormatter
Methods inherited from JSONAPI::Formatter
Class Method Details
.format(raw_value, context) ⇒ Object
85 86 87 88 89 90 91 92 |
# File 'lib/jsonapi/formatter.rb', line 85 def format(raw_value, context) case raw_value when String, Integer return raw_value else return raw_value.to_s end end |