module Roda::RodaPlugins::Middleware::ClassMethods

  1. lib/roda/plugins/middleware.rb

Methods

Public Instance

  1. new

Public Instance methods

new(app, *args, &block)

Create a Forwarder instead of a new instance if a non-Hash is given.

[show source]
    # File lib/roda/plugins/middleware.rb
181 def new(app, *args, &block)
182   if app.is_a?(Hash)
183     super
184   else
185     Forwarder.new(self, app, *args, &block)
186   end
187 end