Sha256: 40c6217e4ba0a3778f86c910e76af3c2c35806cd5ccfa0416a3b505c69ce2a02

Contents?: true

Size: 779 Bytes

Versions: 8

Compression:

Stored size: 779 Bytes

Contents

module Mutant
  class Mutator
    # Namespace for utility mutators
    class Util < self

      # Run utility mutator
      #
      # @param [Object] object
      # @param [Object] parent
      #
      # @return [Enumerator<Object>]
      #   if no block given
      #
      # @return [self]
      #   otherwise
      #
      # @api private
      def self.each(object, parent, &block)
        return to_enum(__method__, object, parent) unless block_given?

        new(object, parent, block)

        self
      end

    private

      # Test if mutation is new
      #
      # @param [Object] generated
      #
      # @return [Boolean]
      #
      # @api private
      def new?(generated)
        !input.eql?(generated)
      end

    end # Util
  end # Mutator
end # Mutant

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.8.8 lib/mutant/mutator/util.rb
mutant-0.8.7 lib/mutant/mutator/util.rb
mutant-0.8.6 lib/mutant/mutator/util.rb
mutant-0.8.5 lib/mutant/mutator/util.rb
mutant-0.8.4 lib/mutant/mutator/util.rb
mutant-0.8.3 lib/mutant/mutator/util.rb
mutant-0.8.2 lib/mutant/mutator/util.rb
mutant-0.8.1 lib/mutant/mutator/util.rb