Class: Rack::Compatible

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/compatible.rb,
lib/rack/compatible/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Compatible

Returns a new instance of Compatible.



5
6
7
# File 'lib/rack/compatible.rb', line 5

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
12
13
# File 'lib/rack/compatible.rb', line 9

def call(env)
  status, headers, response = @app.call(env)
  headers['X-UA-Compatible'] ||= 'IE=edge,chrome=1'
  [status, headers, response]
end