Class: Rack::Pesticide
- Inherits:
-
Object
- Object
- Rack::Pesticide
- Defined in:
- lib/rack/pesticide.rb,
lib/rack/pesticide/version.rb
Constant Summary collapse
- VERSION =
"1.0.5"
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Pesticide
constructor
A new instance of Pesticide.
Constructor Details
#initialize(app) ⇒ Pesticide
Returns a new instance of Pesticide.
3 4 5 |
# File 'lib/rack/pesticide.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/rack/pesticide.rb', line 7 def call(env) if pest?(env) forbidden else @app.call(env) end end |