Sha256: 29dcabef7df7d16350eb84e9428a1c92e9a4c85d32be5ddca920421f23e59e5a

Contents?: true

Size: 836 Bytes

Versions: 3

Compression:

Stored size: 836 Bytes

Contents

module Mutant
  # Abstract matcher to find subjects to mutate
  class Matcher
    include Adamantium::Flat, Enumerable, AbstractType
    extend DescendantsTracker

    # Enumerate subjects
    #
    # @param [Object] input
    #
    # @return [self]
    #   if block given
    #
    # @return [Enumerator<Subject>]
    #
    # @api private
    #
    def self.each(input, &block)
      return to_enum(__method__, input) unless block_given?

      new(input).each(&block)

      self
    end

    # Enumerate subjects
    #
    # @api private
    #
    # @return [self]
    #   if block given
    #
    # @return [Enumerabe<Subject>]
    #   otherwise
    #
    abstract_method :each

    # Return identification
    #
    # @return [String
    #
    # @api private
    #
    abstract_method :identification

  end # Matcher
end # Mutant

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mutant-0.3.0.beta4 lib/mutant/matcher.rb
mutant-0.3.0.beta3 lib/mutant/matcher.rb
mutant-0.3.0.beta2 lib/mutant/matcher.rb