Module: Roda::RodaPlugins::Middleware::ClassMethods
- Defined in:
- lib/roda/plugins/middleware.rb
Instance Method Summary collapse
-
#new(app, *args, &block) ⇒ Object
Create a Forwarder instead of a new instance if a non-Hash is given.
Instance Method Details
#new(app, *args, &block) ⇒ Object
Create a Forwarder instead of a new instance if a non-Hash is given.
179 180 181 182 183 184 185 |
# File 'lib/roda/plugins/middleware.rb', line 179 def new(app, *args, &block) if app.is_a?(Hash) super else Forwarder.new(self, app, *args, &block) end end |