free_mutant/lib/mutant/runner/mutation.rb
2013-02-02 16:32:13 +01:00

42 lines
703 B
Ruby

module Mutant
class Runner
# Mutation runner
class Mutation < self
# Return killer instance
#
# @return [Killer]
#
# @api private
#
attr_reader :killer
# Initialize object
#
# @param [Configuration] config
# @param [Mutation] mutation
#
# @return [undefined]
#
# @api private
#
def initialize(config, mutation)
@mutation = mutation
super(config)
end
private
# Perform operation
#
# @return [undefined]
#
# @api private
#
def run
@killer = config.strategy(@mutation).kill(@mutation)
end
end
end
end