Sha256: 9ad5d6b0fda6db58ba2e5f5e52aec7bd7f963018f9024fd12809498b6427c243
Contents?: true
Size: 1.34 KB
Versions: 33
Compression:
Stored size: 1.34 KB
Contents
# encoding: utf-8 module Mutant class Mutator class Util # Mutators that mutates an array of inputs class Array < self handle(::Array) # Element presence mutator class Presence < Util private # Emit element presence mutations # # @return [undefined] # # @api 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 # Emit mutations # # @return [undefined] # # @api private # def dispatch input.each_with_index do |element, index| Mutator.each(element).each do |mutation| dup = dup_input dup[index] = mutation emit(dup) end end end end # Element private # Emit mutations # # @return [undefined] # # @api private # def dispatch run(Element) run(Presence) emit([]) end end # Array end # Node end # Mutant end # Mutator
Version data entries
33 entries across 33 versions & 1 rubygems