Method: RuboCop::Cop::Lint::MixedRegexpCaptureTypes#on_regexp
- Defined in:
- lib/rubocop/cop/lint/mixed_regexp_capture_types.rb
permalink #on_regexp(node) ⇒ Object
[View source]
27 28 29 30 31 32 33 |
# File 'lib/rubocop/cop/lint/mixed_regexp_capture_types.rb', line 27 def on_regexp(node) return if node.interpolation? return if node.each_capture(named: false).none? return if node.each_capture(named: true).none? add_offense(node) end |