Object
Implements the Rack middleware interface.
Inserts a new Rack::Accept::Request object into the environment before handing the request to the app immediately downstream.
# File lib/rack/accept/context.rb, line 19 def call(env) request = env['rack-accept.request'] ||= Request.new(env) check!(request) unless @checks.empty? @app.call(env) rescue AcceptError response = Response.new response.not_acceptable! response.finish end
Defines the character sets this server is able to serve.
# File lib/rack/accept/context.rb, line 35 def charsets=(charsets) add_check(:charset, charsets) end
Defines the types of encodings this server is able to serve.
# File lib/rack/accept/context.rb, line 40 def encodings=(encodings) add_check(:encoding, encodings) end
Generated with the Darkfish Rdoc Generator 2.