Class: Rubocop::Cop::OneLineConditional

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



57
58
59
# File 'lib/rubocop/cop/if_then_else.rb', line 57

def error_message
  'Favor the ternary operator (?:) over if/then/else/end constructs.'
end