2012-12-06 15:30:28 -05:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
|
|
|
class Literal
|
|
|
|
# Mutator for string literals
|
|
|
|
class String < self
|
|
|
|
|
2013-06-04 04:25:13 -04:00
|
|
|
handle(:str)
|
2012-12-06 15:30:28 -05:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutants
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
emit_nil
|
|
|
|
emit_new { new_self(Random.hex_string) }
|
|
|
|
end
|
2013-06-04 04:25:13 -04:00
|
|
|
|
|
|
|
end # String
|
|
|
|
end # Literal
|
|
|
|
end # Node
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|