Module: RuboCop::Cop::OnNormalIfUnless

Included in:
Style::EmptyElse, Style::IfWithSemicolon, Style::MissingElse, Style::MultilineIfThen, Style::OneLineConditional
Defined in:
lib/rubocop/cop/mixin/on_normal_if_unless.rb

Overview

Common functionality for cops checking if and unless expressions.

Instance Method Summary collapse

Instance Method Details

#on_if(node) ⇒ Object



7
8
9
10
11
# File 'lib/rubocop/cop/mixin/on_normal_if_unless.rb', line 7

def on_if(node)
  return if node.modifier_form? || node.ternary?

  on_normal_if_unless(node)
end