module Roda::RodaPlugins::RequestAref
def self.configure(app, setting)
Make #[] and #[]= methods work as configured by aliasing the appropriate
def self.configure(app, setting) case setting when :allow, :raise, :warn app::RodaRequest.class_eval do alias_method(:[], :"request_aref_#{setting}") alias_method(:[]=, :"request_aset_#{setting}") public :[], :[]= end else raise RodaError, "Unsupport request_aref plugin setting: #{setting.inspect}" end end