Class: Roda::RodaPlugins::WedgePlugin

Inherits:
Object
  • Object
show all
Defined in:
lib/roda/plugins/wedge.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods, RequestMethods

Class Method Summary collapse

Class Method Details

.configure(app, opts = false, &block) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/roda/plugins/wedge.rb', line 4

def self.configure(app, opts = false, &block)
  case opts || block
  when Proc
    Wedge.config.instance_eval &opts
  else
    opts.each { |k, v| Wedge.config.send "#{k}=", v }
  end

  app.use Wedge::Middleware, opts || block
end