Parent

Methods

Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::Style::BlockNesting

This cop checks for excessive nesting of conditional and looping constructs. Despite the cop's name, blocks are not considered as an extra level of nesting.

The maximum level of nesting allowed is configurable.

Constants

NESTING_BLOCKS

Public Instance Methods

investigate(processed_source) click to toggle source
# File lib/rubocop/cop/style/block_nesting.rb, line 18
def investigate(processed_source)
  return unless processed_source.ast
  max = cop_config['Max']
  check_nesting_level(processed_source.ast, max, 0)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.