Class: RuboCop::Cop::Style::DisallowTry

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/style/disallow_try.rb

Constant Summary collapse

MSG =
'Do not use `try` or `try!`. Use explicit conditionals instead.'
RESTRICT_ON_SEND =
%i[try try!].freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



13
14
15
# File 'lib/rubocop/cop/style/disallow_try.rb', line 13

def on_send(node)
  add_offense(node)
end