Class: Torba::RemoteSources::Targz

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

Overview

Represents remote tar.gz archive.

Since:

  • 0.3.0

Direct Known Subclasses

Npm

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#[]

Constructor Details

#initialize(url) ⇒ Targz

Returns a new instance of Targz.

Since:

  • 0.3.0



15
16
17
18
# File 'lib/torba/remote_sources/targz.rb', line 15

def initialize(url)
  @url = url
  @digest = "#{File.basename(url).sub(/\.(tgz|tar\.gz)$/, '')}-#{Torba.digest(url)}"
end

Instance Attribute Details

#digestObject (readonly)

Since:

  • 0.3.0



13
14
15
# File 'lib/torba/remote_sources/targz.rb', line 13

def digest
  @digest
end

#urlObject (readonly)

Since:

  • 0.3.0



13
14
15
# File 'lib/torba/remote_sources/targz.rb', line 13

def url
  @url
end