Class: RuboCop::Cop::Lint::NoHTTParty

Inherits:
RuboCop::Cop show all
Defined in:
lib/rubocop/cop/lint/no_http_party.rb

Overview

Examples:

# bad
HTTParty.get(..)

# good
TimedRequest.get(...)

Constant Summary collapse

MSG =
'Prefer `TimedRequest` instead of raw `HTTParty` calls.'.freeze

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



17
18
19
20
# File 'lib/rubocop/cop/lint/no_http_party.rb', line 17

def on_send(node)
  return unless is_HTTParty?(node)
  add_offense(node)
end