Sha256: c1f355c96a0d7730a063456f93d1812a9e5c6986d93e0babb574c9c91da36f6e

Contents?: true

Size: 772 Bytes

Versions: 10

Compression:

Stored size: 772 Bytes

Contents

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

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

        new(object, block)

        self
      end

      # Test if mutation is new
      #
      # @param [Object] generated
      #
      # @return [true]
      #   if object is new
      #
      # @return [false]
      #   otherwise
      #
      # @api private
      #
      def new?(generated)
        input != generated
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mutant-0.2.20 lib/mutant/mutator/util.rb
mutant-0.2.17 lib/mutant/mutator/util.rb
mutant-0.2.16 lib/mutant/mutator/util.rb
mutant-0.2.15 lib/mutant/mutator/util.rb
mutant-0.2.14 lib/mutant/mutator/util.rb
mutant-0.2.13 lib/mutant/mutator/util.rb
mutant-0.2.12 lib/mutant/mutator/util.rb
mutant-0.2.11 lib/mutant/mutator/util.rb
mutant-0.2.9 lib/mutant/mutator/util.rb
mutant-0.2.8 lib/mutant/mutator/util.rb