Sha256: 1e46ca5f47a773b506dcee698afa8eea18844c369a813e2e4201ddfd428e5588
Contents?: true
Size: 1.02 KB
Versions: 17
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true module Mutant class Mutator class Util # Mutators that mutates an array of inputs class Array < self # Element presence mutator class Presence < Util private # Emit element presence mutations # # @return [undefined] def dispatch input.each_index do |index| dup = dup_input dup.delete_at(index) emit(dup) end end end # Presence # Array element mutator class Element < Util private # Emit mutations # # @return [undefined] def dispatch input.each_with_index do |element, index| Mutator.mutate(element).each do |mutation| dup = dup_input dup[index] = mutation emit(dup) end end end end # Element end # Array end # Util end # Mutator end # Mutant
Version data entries
17 entries across 17 versions & 1 rubygems