Class: Torba::RemoteSources::Zip

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/torba/remote_sources/zip.rb

Overview

Represents remote zip archive.

Since:

  • 0.1.0

Direct Known Subclasses

GithubRelease

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#[]

Constructor Details

#initialize(url) ⇒ Zip

Returns a new instance of Zip.

Since:

  • 0.1.0



14
15
16
17
# File 'lib/torba/remote_sources/zip.rb', line 14

def initialize(url)
  @url = url
  @digest = "#{File.basename url, '.zip'}-#{Torba.digest(url)}"
end

Instance Attribute Details

#digestObject (readonly)

Since:

  • 0.1.0



12
13
14
# File 'lib/torba/remote_sources/zip.rb', line 12

def digest
  @digest
end

#urlObject (readonly)

Since:

  • 0.1.0



12
13
14
# File 'lib/torba/remote_sources/zip.rb', line 12

def url
  @url
end