Class: Rubocop::Cop::ParenthesesAroundCondition
- Defined in:
- lib/rubocop/cop/parentheses_around_condition.rb
Constant Summary collapse
- MSG =
"Don't use parentheses around the condition of an " + 'if/unless/while/until, unless the condition contains an assignment.'
Instance Attribute Summary
Attributes inherited from Cop
#debug, #disabled_lines, #offences
Instance Method Summary collapse
Methods inherited from Cop
#add_offence, cop_name, #has_report?, #ignore_node, inherited, #initialize, #inspect, #name, #on_comment
Constructor Details
This class inherits a constructor from Rubocop::Cop::Cop
Instance Method Details
#on_if(node) ⇒ Object
9 10 11 12 13 |
# File 'lib/rubocop/cop/parentheses_around_condition.rb', line 9 def on_if(node) process_control_op(node) super end |
#on_until(node) ⇒ Object
21 22 23 24 25 |
# File 'lib/rubocop/cop/parentheses_around_condition.rb', line 21 def on_until(node) process_control_op(node) super end |
#on_while(node) ⇒ Object
15 16 17 18 19 |
# File 'lib/rubocop/cop/parentheses_around_condition.rb', line 15 def on_while(node) process_control_op(node) super end |