free_mutant/lib/mutant/strategy.rb
Markus Schirp 7ae6e09908 Fix object cycle
Strategy currently does not need to be initialized with config.
2013-06-15 16:32:40 +02:00

50 lines
716 B
Ruby

module Mutant
# Abstract base class for killing strategies
class Strategy
include AbstractType, Adamantium::Flat
# Perform setup
#
# @return [self]
#
# @api private
#
def self.setup
self
end
# Perform teardown
#
# @return [self]
#
# @api private
#
def self.teardown
self
end
# Kill mutation
#
# @param [Mutation] mutation
#
# @return [Killer]
#
# @api private
#
def self.kill(mutation)
killer.new(self, mutation)
end
# Return killer
#
# @return [Class:Killer]
#
# @api private
#
def self.killer
self::KILLER
end
end # Strategy
end # Mutant