Class: RuboCop::Cop::Style::DisallowSafeNavigation

Inherits:
RuboCop::Cop
  • Object
show all
Extended by:
TargetRubyVersion
Defined in:
lib/rubocop/cop/style/disallow_safe_navigation.rb

Overview

Disallow the safe navigation operator

Examples:

# bad
foo&.bar

Constant Summary collapse

MSG =
'Do not use &.'.freeze

Instance Method Summary collapse

Instance Method Details

#on_csend(node) ⇒ Object



19
20
21
# File 'lib/rubocop/cop/style/disallow_safe_navigation.rb', line 19

def on_csend(node)
  add_offense(node)
end