class Gems::ResponseParser
Parses HTTP responses from the RubyGems API @api private
Public Instance Methods
Parse an HTTP response
@api private @param response [Net::HTTPResponse] the HTTP response to parse @return [String] the response body @raise [HTTPError] if the response is not successful @example Parse a response
parser.parse(response: response)
# File lib/gems/response_parser.rb, line 52 def parse(response:) raise error(response) unless response.is_a?(Net::HTTPSuccess) response.body.to_s end