123456789_123456789_123456789_123456789_123456789_

Class: RuboCop::Cop::VariableForce::Branch::For Private

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Base, Struct
Instance Chain:
self, Base, Struct
Inherits: RuboCop::Cop::VariableForce::Branch::Base
Defined in: lib/rubocop/cop/variable_force/branch.rb

Overview

for element in collection loop_body end

Class Method Summary

Instance Attribute Summary

Base - Inherited

#always_run?, #branched?,
#child_node

Abstract base class for branch classes.

#may_jump_to_other_branch?, #may_run_incompletely?,
#scope

Abstract base class for branch classes.

Instance Method Summary

Instance Attribute Details

#always_run?Boolean (readonly)

[ GitHub ]

  
# File 'lib/rubocop/cop/variable_force/branch.rb', line 252

def always_run?
  element? || collection?
end