Method: RuboCop::Cop::Lint::OutOfRangeRegexpRef#on_when
- Defined in:
- lib/rubocop/cop/lint/out_of_range_regexp_ref.rb
permalink #on_when(node) ⇒ Object
[View source]
66 67 68 69 70 |
# File 'lib/rubocop/cop/lint/out_of_range_regexp_ref.rb', line 66 def on_when(node) regexp_conditions = node.conditions.select(&:regexp_type?) @valid_ref = regexp_conditions.filter_map { |condition| check_regexp(condition) }.max end |