class Rack::UserAgent
Constants
- VERSION
Public Class Methods
new(app, options = {})
click to toggle source
# File lib/rack/user_agent.rb, line 10 def initialize(app, options = {}) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/user_agent.rb, line 14 def call(env) env["rack.woothee"] = ::Woothee.parse(env["HTTP_USER_AGENT"] || "") @app.call(env) end