Method: Roda::RodaPlugins::Delegate::ClassMethods#class_delegate
- Defined in:
- lib/roda/plugins/delegate.rb
#class_delegate(*meths) ⇒ Object
Delegate the given methods to the class
50 51 52 53 54 |
# File 'lib/roda/plugins/delegate.rb', line 50 def class_delegate(*meths) meths.each do |meth| define_method(meth){|*a, &block| self.class.send(meth, *a, &block)} end end |