free_mutant/lib/mutant/killer/static.rb
Dan Kubb 7293386c26 Add magic encoding header to all ruby files
* rubocop still warns about this on ruby 1.9.3, so it was fixed so
  it produces less output on travis.
2013-07-28 16:03:06 -07:00

34 lines
610 B
Ruby

# encoding: utf-8
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 # Success
# Killer that always fails
class Fail < self
RESULT = false
end # Fail
end # Static
end # Killer
end # Mutant