free_mutant/lib/mutant/mutator/node/and_asgn.rb
Markus Schirp 3ae85ea0f9 Refactor and consolidate node type checks in to private methods
* Before Symbol#==, Symbol#eql?, and Symbol#equal? where used
  inconsistently
* Lots of redundant foo.type.equal?(:symbol)
2014-06-10 02:06:00 +00:00

31 lines
515 B
Ruby

module Mutant
class Mutator
class Node
# OpAsgn mutator
class AndAsgn < self
handle(:and_asgn)
children :left, :right
private
# Emit mutations
#
# @return [undefined]
#
# @api private
#
def dispatch
emit_singletons
emit_left_mutations do |node|
!n_self?(node)
end
emit_right_mutations
end
end # AndAsgn
end # Node
end # Mutator
end # Mutant