Class: ActiveMutator::Operators::NegationRemoval

Inherits:
Base
  • Object
show all
Defined in:
lib/active_mutator/operators/negation_removal.rb

Constant Summary

Constants inherited from Base

Base::REGISTRY

Instance Method Summary collapse

Methods inherited from Base

all, inherited

Instance Method Details

#edits(node) ⇒ Object



4
5
6
7
8
# File 'lib/active_mutator/operators/negation_removal.rb', line 4

def edits(node)
  return [] unless node.is_a?(Prism::CallNode) && node.name == :! && node.receiver

  [edit(loc_range(node.location), node.receiver.slice, "remove negation")]
end