Sha256: be57c0f1ed58933c091ae25547b7977a179c121fe56dcfb5328c334beb750d89

Contents?: true

Size: 728 Bytes

Versions: 1

Compression:

Stored size: 728 Bytes

Contents

# encoding: utf-8

module Mutant

  # Abstract base class for killing strategies
  class Strategy
    include AbstractType, Adamantium::Flat

    # Perform strategy setup
    #
    # @return [self]
    #
    # @api private
    #
    def setup
    end

    # Perform strategy teardown
    #
    # @return [self]
    #
    # @api private
    #
    def teardown
    end

    # Kill mutation
    #
    # @param [Mutation] mutation
    #
    # @return [Killer]
    #
    # @api private
    #
    def kill(mutation)
      killer.new(self, mutation)
    end

  private

    # Return killer
    #
    # @return [Class:Killer]
    #
    # @api private
    #
    def killer
      self.class::KILLER
    end

  end # Strategy
end # Mutant

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mutant-0.3.0.rc1 lib/mutant/strategy.rb