lib/grape/middleware/base.rb in grape-0.2.1 vs lib/grape/middleware/base.rb in grape-0.2.1.1
- old
+ new
@@ -68,9 +68,13 @@
def parsers
PARSERS.merge(options[:parsers] || {})
end
+ def content_type_for(format)
+ Hash.new(content_types)[format.to_sym]
+ end
+
def content_types
CONTENT_TYPES.merge(options[:content_types] || {})
end
def content_type