Class: Rubocop::Cop::IfWithSemicolon

Inherits:
Cop
  • Object
show all
Includes:
IfThenElse
Defined in:
lib/rubocop/cop/if_then_else.rb

Instance Attribute Summary

Attributes inherited from Cop

#correlations, #offences

Instance Method Summary collapse

Methods included from IfThenElse

#inspect, #kind_of_if

Methods inherited from Cop

#add_offence, #has_report?, inherited, #initialize

Constructor Details

This class inherits a constructor from Rubocop::Cop::Cop

Instance Method Details

#error_messageObject



43
44
45
# File 'lib/rubocop/cop/if_then_else.rb', line 43

def error_message
  'Never use if x; Use the ternary operator instead.'
end