Class: RuboCop::Cop::Yoshiki::Layout::EmptyLineAroundMultilineConditional
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Yoshiki::Layout::EmptyLineAroundMultilineConditional
- Extended by:
- AutoCorrector
- Includes:
- EmptyLineAroundMultilineStatement
- Defined in:
- lib/rubocop/cop/yoshiki/layout/empty_line_around_multiline_conditional.rb
Overview
Isolates a multiline if / unless / case / while / until /
for / begin statement from neighboring statements with a blank
line.
Modifier and ternary forms are skipped. An if that is the RHS of an
assignment is Yoshiki/Layout/EmptyLineAroundMultilineAssignment.
Constant Summary collapse
- MSG_BEFORE =
'Add a blank line before this multiline conditional.'.freeze
- MSG_AFTER =
'Add a blank line after this multiline conditional.'.freeze
Constants included from EmptyLineAroundMultilineStatement::Paragraph
EmptyLineAroundMultilineStatement::Paragraph::BLOCK_TYPES, EmptyLineAroundMultilineStatement::Paragraph::BODY_TYPES, EmptyLineAroundMultilineStatement::Paragraph::CONDITIONAL_TYPES
Instance Method Summary collapse
- #on_if(node) ⇒ Object (also: #on_case, #on_case_match, #on_while, #on_until, #on_for, #on_kwbegin)
Instance Method Details
#on_if(node) ⇒ Object Also known as: on_case, on_case_match, on_while, on_until, on_for, on_kwbegin
39 40 41 |
# File 'lib/rubocop/cop/yoshiki/layout/empty_line_around_multiline_conditional.rb', line 39 def on_if node inspect_conditional(node) end |