Class: Brut::FrontEnd::Middlewares::AnnotateBrutOwnedPaths
- Inherits:
-
Brut::FrontEnd::Middleware
- Object
- Brut::FrontEnd::Middleware
- Brut::FrontEnd::Middlewares::AnnotateBrutOwnedPaths
- Defined in:
- lib/brut/front_end/middlewares/annotate_brut_owned_paths.rb
Overview
Annotates any path that is owned by Brut as such. Alleviates downstream code from having to include the actual
path determination Brut uses. After this middleware has run, env["brut.owned_path"]
will return true
if the path
represents one that Brut is managing.
Instance Method Summary collapse
-
#call(env) ⇒ Object
-
#initialize(app) ⇒ AnnotateBrutOwnedPaths
constructor
A new instance of AnnotateBrutOwnedPaths.
Constructor Details
#initialize(app) ⇒ AnnotateBrutOwnedPaths
Returns a new instance of AnnotateBrutOwnedPaths.
5 6 7 |
# File 'lib/brut/front_end/middlewares/annotate_brut_owned_paths.rb', line 5 def initialize(app) @app = app end |