class RuboCop::Cop::Style::DisallowSafeNavigation
The “safe navigation” operator &. makes it easier to work with and propagate nil values. This will disallow the safe navigation operator
@example
# bad foo&.bar a.foo&.bar
Constants
- MSG
Public Instance Methods
on_csend(node)
click to toggle source
# File lib/rubocop/cop/style/disallow_safe_navigation.rb, line 20 def on_csend(node) add_offense(node) end