Method: RuboCop::Cop::InternalAffairs::RedundantMessageArgument#on_send

Defined in:
lib/rubocop/cop/internal_affairs/redundant_message_argument.rb

#on_send(node) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
# File 'lib/rubocop/cop/internal_affairs/redundant_message_argument.rb', line 44

def on_send(node)
  node_type_check(node) do |node_arg, kwargs|
    find_offending_argument(node_arg, kwargs) do |pair|
      add_offense(pair) do |corrector|
        range = offending_range(pair)

        corrector.remove(range)
      end
    end
  end
end