Class: RuboCop::Cop::Style::NestedModifier
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Style::NestedModifier
- Extended by:
- AutoCorrector
- Includes:
- RangeHelp
- Defined in:
- lib/rubocop/cop/style/nested_modifier.rb
Overview
Checks for nested use of if, unless, while and until in their modifier form.
Constant Summary collapse
- MSG =
'Avoid using nested modifiers.'
Instance Method Summary collapse
- #on_while(node) ⇒ Object (also: #on_until, #on_if)
Methods included from AutoCorrector
Instance Method Details
#on_while(node) ⇒ Object Also known as: on_until, on_if
22 23 24 |
# File 'lib/rubocop/cop/style/nested_modifier.rb', line 22 def on_while(node) check(node) end |