Method: Mutant::Result::ClassMethods#delegate

Defined in:
lib/mutant/result.rb

#delegate(name, target) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Delegate a method to child



44
45
46
47
48
# File 'lib/mutant/result.rb', line 44

def delegate(name, target)
  define_method(name) do
    public_send(target).public_send(name)
  end
end