module Sinatra::Delegator

def self.delegate(*methods)

:nodoc:
at the top-level.
methods to be delegated to the Sinatra::Application class. Used primarily
Sinatra delegation mixin. Mixing this module into an object causes all
def self.delegate(*methods)
  methods.each do |method_name|
    eval <<-RUBY, binding, '(__DELEGATE__)', 1
      def #{method_name}(*args, &b)
        ::Sinatra::Application.send(#{method_name.inspect}, *args, &b)
      end
      private #{method_name.inspect}
    RUBY
  end
end