Module: Sipatra::Delegator
- Defined in:
- lib/sipatra/base.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.delegate(*methods) ⇒ Object
335 336 337 338 339 340 341 342 343 344 |
# File 'lib/sipatra/base.rb', line 335 def self.delegate(*methods) methods.each do |method_name| eval <<-RUBY, binding, '(__DELEGATE__)', 1 def #{method_name}(*args, &b) ::Sipatra::Application.send(#{method_name.inspect}, *args, &b) end private #{method_name.inspect} RUBY end end |