module Roda::RodaPlugins::Delegate::ClassMethods
def class_delegate(*meths)
def class_delegate(*meths) meths.each do |meth| define_method(meth){|*a, &block| self.class.send(meth, *a, &block)} end end
def request_delegate(*meths)
def request_delegate(*meths) meths.each do |meth| define_method(meth){|*a, &block| @_request.send(meth, *a, &block)} end end
def response_delegate(*meths)
def response_delegate(*meths) meths.each do |meth| define_method(meth){|*a, &block| @_response.send(meth, *a, &block)} end end