Class: JSONAPI::Consumer::Formatter
- Inherits:
-
Object
- Object
- JSONAPI::Consumer::Formatter
show all
- Defined in:
- lib/jsonapi/consumer/formatter.rb
Class Method Summary
collapse
Class Method Details
6
7
8
|
# File 'lib/jsonapi/consumer/formatter.rb', line 6
def format(arg)
arg.to_s
end
|
16
17
18
19
|
# File 'lib/jsonapi/consumer/formatter.rb', line 16
def formatter_for(format)
formatter_class_name = "JSONAPI::Consumer::#{format.to_s.camelize}Formatter"
formatter_class_name.safe_constantize
end
|
10
11
12
13
14
|
# File 'lib/jsonapi/consumer/formatter.rb', line 10
def unformat(arg)
arg.to_s
end
|