free_mutant/lib/mutant/killer/static.rb
2013-02-01 23:39:00 +01:00

31 lines
546 B
Ruby

module Mutant
class Killer
# Abstract base class for killer with static result
class Static < self
# Return result
#
# @return [true]
# if mutation was killed
#
# @return [false]
# otherwise
#
# @api private
#
def run
self.class::RESULT
end
# Killer that is always successful
class Success < self
RESULT = true
end
# Killer that always fails
class Fail < self
RESULT = false
end
end
end
end