Class: Utopia::Middleware::Filter
- Inherits:
-
Object
- Object
- Utopia::Middleware::Filter
- Defined in:
- lib/utopia/middleware/filter.rb
Overview
This class filters a incoming request and only executes a given block if it matches the given filter path.
Instance Method Summary collapse
- #applicable(request) ⇒ Object
- #call(env) ⇒ Object
-
#initialize(app, filter, &block) ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
Instance Method Details
#applicable(request) ⇒ Object
19 20 21 |
# File 'lib/utopia/middleware/filter.rb', line 19 def applicable(request) return request.path.index(@filter) != nil end |