Class: Rack::RespondTo::Format
- Inherits:
-
Array
- Object
- Array
- Rack::RespondTo::Format
- Defined in:
- lib/rack/respond_to.rb
Overview
NOTE Array instead of hash because order matters (wildcard type matches first handler)
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(format, *args, &handler) ⇒ Object
:nodoc:
188 189 190 |
# File 'lib/rack/respond_to.rb', line 188 def method_missing(format, *args, &handler) self << [RespondTo::MediaType(format.to_s), handler] end |