Class: Theme::Assets::Middleware
- Inherits:
-
Object
- Object
- Theme::Assets::Middleware
- Defined in:
- lib/theme/assets/middleware.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
readonly
Returns the value of attribute app.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
Instance Method Summary collapse
- #call(env) ⇒ Object
- #call!(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
9 10 11 |
# File 'lib/theme/assets/middleware.rb', line 9 def initialize(app) @app = app end |
Instance Attribute Details
#app ⇒ Object (readonly)
Returns the value of attribute app.
7 8 9 |
# File 'lib/theme/assets/middleware.rb', line 7 def app @app end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
7 8 9 |
# File 'lib/theme/assets/middleware.rb', line 7 def env @env end |
Instance Method Details
#call(env) ⇒ Object
13 14 15 |
# File 'lib/theme/assets/middleware.rb', line 13 def call env dup.call! env end |
#call!(env) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/theme/assets/middleware.rb', line 17 def call! env @env = env if assets_path render_assets else res end end |