Sha256: 645155eaffd339aed29c01d969c2bfe042211e8fd87ac55d6818c08bc32db1d1
Contents?: true
Size: 884 Bytes
Versions: 52
Compression:
Stored size: 884 Bytes
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 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 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
52 entries across 52 versions & 1 rubygems