free_mutant/lib/mutant/strategy.rb

51 lines
716 B
Ruby
Raw Normal View History

2012-11-21 18:10:50 -05:00
module Mutant
# Abstract base class for killing strategies
2013-04-17 23:31:21 -04:00
class Strategy
include AbstractType, Adamantium::Flat
2013-01-15 17:46:05 -05:00
# Perform setup
#
2013-01-15 17:46:05 -05:00
# @return [self]
#
# @api private
#
def self.setup
2013-01-15 17:46:05 -05:00
self
end
2013-01-15 17:46:05 -05:00
# Perform teardown
#
2013-01-15 17:46:05 -05:00
# @return [self]
#
# @api private
#
def self.teardown
2013-01-15 17:46:05 -05:00
self
end
2012-11-21 18:10:50 -05:00
# Kill mutation
#
# @param [Mutation] mutation
2012-11-21 18:10:50 -05:00
#
# @return [Killer]
#
# @api private
#
def self.kill(mutation)
2012-11-21 18:10:50 -05:00
killer.new(self, mutation)
end
# Return killer
#
# @return [Class:Killer]
#
# @api private
#
def self.killer
self::KILLER
2012-11-21 18:10:50 -05:00
end
2013-06-14 14:54:02 -04:00
end # Strategy
end # Mutant