lib/yt/request.rb
def run
      if matches_expectations?
        response.tap{parse_response!}
      elsif run_again?
        run
      else
        raise response_error, error_message.to_json
      end
    end
# Sends the request and returns the response.
# If the request fails once for a temporary server error or an expired
# token, tries the request again before eventually raising an error.
# @return [Net::HTTPResponse] if the request succeeds and matches the
#   expectations, the response with the body appropriately parsed.
# @raise [Yt::RequestError] if the request fails or the response does
#   not match the expectations.
Sends the request and returns the response.
If the request fails once for a temporary server error or an expired
token, tries the request again before eventually raising an error.
Sends the request and returns the response . If the request fails once for a temporary server error or an expired token tries the request again before eventually raising an error .
def run
      if matches_expectations?
        response.tap{parse_response!}
      elsif run_again?
        run
      else
        raise response_error, error_message.to_json
      end
    end
def run if matches_expectations? response . tap { parse_response! } elsif run_again? run else raise response_error , error_message . to_json end end
Sends the request and returns the response.
Sends the request and returns the response .
if the request succeeds and matches the expectations, the response with the body appropriately parsed.
if the request succeeds and matches the expectations the response with the body appropriately parsed .
Net::HTTPResponse
[Yt::RequestError] if the request fails or the response does not match the expectations.
[ Yt :: RequestError ] if the request fails or the response does not match the expectations .