Module: Rios::Easy
- Included in:
- Object
- Defined in:
- lib/rios/easy.rb
Constant Summary collapse
- @@proxy =
Rios::Proxy.new
Class Method Summary collapse
-
.delegate(*methods) ⇒ Object
Inspired from Sinatra.
Class Method Details
.delegate(*methods) ⇒ Object
Inspired from Sinatra
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rios/easy.rb', line 8 def self.delegate(*methods) methods.each do |method_name| eval " def \#{method_name}(*args, &block)\n @@proxy.send(\#{method_name.inspect}, *args, &block)\n end\n private \#{method_name.inspect}\n RUBY\n end\nend\n", binding, '(__DELEGATE__)', 1 |