Class: RuboCop::Cop::VariableForce::Branch::Case Private

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/variable_force/branch.rb

Overview

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.

case target when /pattern/ # when_clause else else_body end

Instance Attribute Summary

Attributes inherited from Base

#child_node, #scope

Instance Method Summary collapse

Methods inherited from Base

#==, #branched?, classes, #control_node, define_predicate, #each_ancestor, #exclusive_with?, #hash, inherited, #may_jump_to_other_branch?, #may_run_incompletely?, #parent, type

Instance Method Details

#always_run?Boolean

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.

Returns:

  • (Boolean)


224
225
226
# File 'lib/rubocop/cop/variable_force/branch.rb', line 224

def always_run?
  target?
end