--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Any specific outgoing headers should be included here. These are not the content-type header but anything in addition to it. <tt>transform_method</tt> should be set to a symbol of the method used to transform a resource into this mime type. For example for the :xml mime type an object might be transformed by calling :to_xml, or for the :js mime type, :to_json. If there is no transform method, use nil.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Autogenerated Methods
- !ruby/struct:SM::Flow::P 
  body: Adding a mime-type adds a render_type method that sets the content type and calls render.
- !ruby/struct:SM::Flow::P 
  body: "By default this does: def render_all, def render_yaml, def render_text, def render_html, def render_xml, def render_js, and def render_yaml"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Parameters
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "key<Symbol>:"
    body: The name of the mime-type. This is used by the provides API
  - !ruby/struct:SM::Flow::LI 
    label: "transform_method<~to_s>:"
    body: The associated method to call on objects to convert them to the appropriate mime-type. For instance, :json would use :to_json as its transform_method.
  - !ruby/struct:SM::Flow::LI 
    label: "mimes<Array[String]>:"
    body: A list of possible values sent in the Accept header, such as text/html, that should be associated with this content-type.
  - !ruby/struct:SM::Flow::LI 
    label: "new_response_headers<Hash>:"
    body: "The response headers to set for the the mime type. For example: 'Content-Type' =&gt; 'application/json; charset=utf-8'; As a shortcut for the common charset option, use :charset =&gt; 'utf-8', which will be correctly appended to the mimetype itself."
  - !ruby/struct:SM::Flow::LI 
    label: "&block:"
    body: a block which recieves the current controller when the format
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: "  is set (in the controller's #content_type method)\n"
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Returns
- !ruby/struct:SM::Flow::P 
  body: nil
- !ruby/struct:SM::Flow::P 
  body: ":api: public"
full_name: Merb::add_mime_type
is_singleton: true
name: add_mime_type
params: (key, transform_method, mimes, new_response_headers = {}, default_quality = 1, &block)
visibility: public
