Clear the list of provides.
Array | An empty Array. |
:api: public
# File lib/merb-core/controller/mixins/responder.rb, line 179 179: def clear_provides 180: self.class_provided_formats.clear 181: end
This class should not provide any of this list of formats, despite any. other definitions previously or in superclasses.
*formats | Registered mime-types. |
Array[Symbol] | List of formats that remain after removing the ones not to provide. |
:api: public
# File lib/merb-core/controller/mixins/responder.rb, line 169 169: def does_not_provide(*formats) 170: self.class_provided_formats -= formats 171: end
This class should only provide the formats listed here, despite any other definitions previously or in superclasses.
*formats | Registered mime-types. |
Array[Symbol] | List of formats passed in. |
:api: public
# File lib/merb-core/controller/mixins/responder.rb, line 153 153: def only_provides(*formats) 154: clear_provides 155: provides(*formats) 156: end
Adds symbols representing formats to the controller’s default list of
provided_formats. These will apply to every action in the controller,
unless modified in the action. If the last argument is a Hash or an Array, these are regarded as
arguments to pass to the to_
*formats | A list of mime-types that the controller should provide. |
Array[Symbol] | List of formats passed in. |
provides :html, :xml
:api: public
# File lib/merb-core/controller/mixins/responder.rb, line 139 139: def provides(*formats) 140: self.class_provided_formats |= formats 141: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.