Cleanup delegator defines for reporters

This commit is contained in:
Markus Schirp 2014-01-19 00:32:31 +01:00
parent d07fad2a35
commit 5eafa79738

View file

@ -18,12 +18,26 @@ module Mutant
#
def self.delegate(*names)
names.each do |name|
define_delegator(name)
end
end
private_class_method :delegate
# Create delegator to object
#
# @param [Symbol] name
#
# @return [undefined]
#
# @api private
#
def self.define_delegator(name)
define_method(name) do
object.public_send(name)
end
private name
end
end
private_class_method :define_delegator
# Registre handler for class
#