Method: AIPP::Downloader::HTTP#initialize

Defined in:
lib/aipp/downloader/http.rb

#initialize(archive: nil, file:, type: nil, headers: {}) ⇒ HTTP

Returns a new instance of HTTP.



11
12
13
14
15
# File 'lib/aipp/downloader/http.rb', line 11

def initialize(archive: nil, file:, type: nil, headers: {})
  @archive = URI(archive) if archive
  @file, @type, @headers = URI(file), type&.to_s, headers
  @digest = (archive || file).to_digest
end