lib/homebrew_automation/source_dist.rb
# Download and return the file contents.
#
# Lazy and memoized.
#
# @return [String] contents of the file
Download and return the file contents.
Lazy and memoized.
Download and return the file contents . Lazy and memoized .
def contents
      @contents = @contents ||
        begin
          resp = @http.get url
          case resp.code
          when 200
            resp.body.to_s
          else
            raise Error.new "Other error: HTTP #{resp.code}"
          end
        rescue RestClient::NotFound
          raise SdistDoesNotExist.new
        end
    end
def contents @contents = @contents || begin resp = @http . get url case resp . code when 200 resp . body . to_s else raise Error . new "Other error: HTTP #{resp.code}" end rescue RestClient :: NotFound raise SdistDoesNotExist . new end end
Download and return the file contents.
Download and return the file contents .
contents of the file
contents of the file
String