Sha256: 33a4f12bbadf3ccc2f6e619a1102c3de5bd3de6c467244735c3cc6e7ef281c90
Contents?: true
Size: 931 Bytes
Versions: 68
Compression:
Stored size: 931 Bytes
Contents
# frozen_string_literal: true module Mutant class Mutator class Node class Literal # Mutator for hash literals class Hash < self handle(:hash) private def dispatch emit_singletons emit_type mutate_body end def mutate_body children.each_index do |index| mutate_child(index) dup_children = children.dup dup_children.delete_at(index) emit_type(*dup_children) end end # Mutator for hash pairs class Pair < Node handle(:pair) children :key, :value private def dispatch emit_key_mutations emit_value_mutations end end # Pair end # Hash end # Literal end # Node end # Mutator end # Mutant
Version data entries
68 entries across 68 versions & 1 rubygems