Module: Metafun::Delegator
- Included in:
- Object
- Defined in:
- lib/metafun/delegator.rb
Instance Method Summary collapse
Instance Method Details
#delegate(target, *methods) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/metafun/delegator.rb', line 3 def delegate(target, *methods) methods.each do |method| self.class.send :define_method, method do |*a, &b| target.send method, *a, &b end end end |