module Roda::RodaPlugins::RequestAref::RequestMethods

def request_aref_allow(k)

Allow #[] calls
def request_aref_allow(k)
  params[k.to_s]
end

def request_aref_raise(k)

Raise error on #[] calls
def request_aref_raise(k)
  raise Error, "#{self.class}#[] has been removed, use #params.[] instead"
end

def request_aref_warn(k)

Always warn on #[] calls
def request_aref_warn(k)
  warn("#{self.class}#[] is deprecated, use #params.[] instead")
  params[k.to_s]
end

def request_aset_allow(k, v)

Allow #[]= calls
def request_aset_allow(k, v)
  params[k.to_s] = v
end

def request_aset_raise(k, v)

Raise error on #[]= calls
def request_aset_raise(k, v)
  raise Error, "#{self.class}#[]= has been removed, use #params.[]= instead"
end

def request_aset_warn(k, v)

Always warn on #[]= calls
def request_aset_warn(k, v)
  warn("#{self.class}#[]= is deprecated, use #params.[]= instead")
  params[k.to_s] = v
end