2018-09-12 14:21:24 +00:00
|
|
|
# frozen_string_literal: true
|
2018-09-12 13:15:43 +00:00
|
|
|
|
2012-12-29 20:12:48 +01:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Util
|
|
|
|
|
2013-06-04 20:23:06 +02:00
|
|
|
# Utility symbol mutator
|
2012-12-29 20:12:48 +01:00
|
|
|
class Symbol < self
|
|
|
|
|
2014-05-10 14:32:18 +00:00
|
|
|
POSTFIX = '__mutant__'.freeze
|
|
|
|
|
2012-12-29 20:12:48 +01:00
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
def dispatch
|
2014-05-10 14:32:18 +00:00
|
|
|
emit((input.to_s + POSTFIX).to_sym)
|
2012-12-29 23:07:45 +01:00
|
|
|
end
|
|
|
|
|
2013-06-04 20:03:26 +02:00
|
|
|
end # Symbol
|
|
|
|
end # Util
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|