Class: Hassless::Middleware
- Inherits:
-
Object
- Object
- Hassless::Middleware
- Defined in:
- lib/hassless/middleware.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Middleware
constructor
A new instance of Middleware.
Constructor Details
#initialize(app) ⇒ Middleware
Returns a new instance of Middleware.
5 6 7 8 |
# File 'lib/hassless/middleware.rb', line 5 def initialize(app) @app = app run if Rails.env == "production" end |
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 |
# File 'lib/hassless/middleware.rb', line 10 def call(env) run if Rails.env == "development" static.call(env) end |