Class: Rack::Standards
- Inherits:
-
Object
- Object
- Rack::Standards
- Defined in:
- lib/rack/standards.rb,
lib/rack/standards/version.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, type = true) ⇒ Standards
constructor
A new instance of Standards.
Constructor Details
#initialize(app, type = true) ⇒ Standards
Returns a new instance of Standards.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rack/standards.rb', line 3 def initialize(app, type = true) @app = app @header = case type when true "IE=Edge,chrome=1" when :builtin "IE=Edge" when false nil end end |
Instance Method Details
#call(env) ⇒ Object
16 17 18 19 20 |
# File 'lib/rack/standards.rb', line 16 def call(env) status, headers, body = @app.call(env) headers["X-UA-Compatible"] = @header [status, headers, body] end |