module Roda::RodaPlugins::DefaultStatus
def self.configure(app, &block)
def self.configure(app, &block) raise RodaError, "default_status plugin requires a block" unless block if check_arity = app.opts.fetch(:check_arity, true) unless block.arity == 0 if check_arity == :warn RodaPlugins.warn "Arity mismatch in block passed to plugin :default_status. Expected Arity 0, but arguments required for #{block.inspect}" end b = block block = lambda{instance_exec(&b)} # Fallback end end app::RodaResponse.send(:define_method, :default_status, &block) end