Class: Evilution::Mutator::Operator::ArgumentRemoval Private

Inherits:
Base
  • Object
show all
Defined in:
lib/evilution/mutator/operator/argument_removal.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

SKIP_TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

[
  Prism::SplatNode,
  Prism::KeywordHashNode,
  Prism::BlockArgumentNode,
  Prism::ForwardingArgumentsNode
].freeze

Instance Attribute Summary

Attributes inherited from Base

#mutations

Instance Method Summary collapse

Methods inherited from Base

#call, clear_parse_cache!, #initialize, operator_name, parsed_tree_for

Constructor Details

This class inherits a constructor from Evilution::Mutator::Base

Instance Method Details

#visit_call_node(node) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
16
17
18
# File 'lib/evilution/mutator/operator/argument_removal.rb', line 13

def visit_call_node(node)
  args = node.arguments&.arguments
  args.each_index { |i| emit_argument_removal(node, args, i) } if mutable?(node, args)

  super
end