Method: RuboCop::Cop::Lint::DeprecatedOpenSSLConstant#on_send

Defined in:
lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb

#on_send(node) ⇒ Object


54
55
56
57
58
59
60
61
62
# File 'lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb', line 54

def on_send(node)
  return if node.arguments.any? { |arg| arg.variable? || arg.call_type? || arg.const_type? }
  return if digest_const?(node.receiver)
  return unless algorithm_const(node)

  message = message(node)

  add_offense(node, message: message) { |corrector| autocorrect(corrector, node) }
end