Parent

Files

Class/Module Index [+]

Quicksearch

RuboCop::Cop::Style::ParenthesesAroundCondition

This cop checks for the presence of superfluous parentheses around the condition of if/unless/while/until.

Public Instance Methods

on_if(node) click to toggle source
# File lib/rubocop/cop/style/parentheses_around_condition.rb, line 11
def on_if(node)
  return if ternary_op?(node)
  process_control_op(node)
end
on_until(node) click to toggle source
# File lib/rubocop/cop/style/parentheses_around_condition.rb, line 20
def on_until(node)
  process_control_op(node)
end
on_while(node) click to toggle source
# File lib/rubocop/cop/style/parentheses_around_condition.rb, line 16
def on_while(node)
  process_control_op(node)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.