Module: RuboCop::Cop::Lint::UnusedArgument

Extended by:
NodePattern::Macros
Included in:
UnusedBlockArgument, UnusedMethodArgument
Defined in:
lib/rubocop/cop/mixin/unused_argument.rb

Overview

Common functionality for cops handling unused arguments.

Instance Method Summary collapse

Methods included from NodePattern::Macros

def_node_matcher, def_node_search, node_search, node_search_all, node_search_body, node_search_first

Instance Method Details

#after_leaving_scope(scope, _variable_table) ⇒ Object



14
15
16
17
18
# File 'lib/rubocop/cop/mixin/unused_argument.rb', line 14

def after_leaving_scope(scope, _variable_table)
  scope.variables.each_value do |variable|
    check_argument(variable)
  end
end

#join_force?(force_class) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/rubocop/cop/mixin/unused_argument.rb', line 10

def join_force?(force_class)
  force_class == VariableForce
end