Module: Sinatra::Delegator

Defined in:
lib/sinatra/base.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.delegate(*methods) ⇒ Object



976
977
978
979
980
981
982
983
984
985
# File 'lib/sinatra/base.rb', line 976

def self.delegate(*methods)
  methods.each do |method_name|
    eval "      def \#{method_name}(*args, &b)\n        ::Sinatra::Application.\#{method_name}(*args, &b)\n      end\n      private :\#{method_name}\n    RUBY\n  end\nend\n", binding, '(__DELEGATE__)', 1