lib/yt/http_request.rb
# Sends the request and returns the response with the body parsed from JSON.
# @return [Net::HTTPResponse] if the request succeeds.
# @raise [Yt::HTTPError] if the request fails.
Sends the request and returns the response with the body parsed from JSON.
Sends the request and returns the response with the body parsed from JSON .
def run
      if response.is_a? Net::HTTPSuccess
        response.tap do
          parse_response!
        end
      else
        raise Yt::HTTPError.new(error_message, response: response)
      end
    end
def run if response . is_a? Net :: HTTPSuccess response . tap do parse_response! end else raise Yt :: HTTPError . new ( error_message , response : response ) end end
Sends the request and returns the response with the body parsed from JSON.
Sends the request and returns the response with the body parsed from JSON .
if the request succeeds.
if the request succeeds .
Net::HTTPResponse
[Yt::HTTPError] if the request fails.
[ Yt :: HTTPError ] if the request fails .