Module: MotionWizard::Forwardable
- Included in:
- ContentController
- Defined in:
- lib/motion-wizard/lib/forwardable.rb
Instance Method Summary collapse
Instance Method Details
#delegate(*methods) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/motion-wizard/lib/forwardable.rb', line 3 def delegate(*methods) to = methods.shift methods.each do |method_name| define_method(method_name) do |*args, &block| self.instance_variable_get(to).send(method_name, *args, &block) end end end |