Method: Grape::DSL::RequestResponse::ClassMethods#formatter

Defined in:
lib/grape/dsl/request_response.rb

#formatter(content_type, new_formatter) ⇒ Object

Specify a custom formatter for a content-type.



34
35
36
# File 'lib/grape/dsl/request_response.rb', line 34

def formatter(content_type, new_formatter)
  namespace_stackable(:formatters, content_type.to_sym => new_formatter)
end