lib/jsonapi/formatter.rb in jsonapi-resources-0.0.7 vs lib/jsonapi/formatter.rb in jsonapi-resources-0.0.8
- old
+ new
@@ -7,10 +7,11 @@
def unformat(arg)
arg
end
+ # :nocov:
if RUBY_VERSION >= '2.0'
def formatter_for(format)
formatter_class_name = "#{format.to_s.camelize}Formatter"
Object.const_get formatter_class_name if formatter_class_name
end
@@ -18,9 +19,10 @@
def formatter_for(format)
formatter_class_name = "#{format.to_s.camelize}Formatter"
formatter_class_name.safe_constantize if formatter_class_name
end
end
+ # :nocov:
end
end
class KeyFormatter < Formatter
class << self
\ No newline at end of file