Class: Torba::RemoteSources::GithubRelease

Inherits:
Zip
  • Object
show all
Defined in:
lib/torba/remote_sources/github_release.rb

Overview

Represents Github release.

Since:

  • 0.1.0

Instance Attribute Summary collapse

Attributes inherited from Zip

#url

Instance Method Summary collapse

Methods inherited from Zip

#digest

Methods included from Common

#[], #digest

Constructor Details

#initialize(source, tag) ⇒ GithubRelease

Returns a new instance of GithubRelease

Parameters:

Since:

  • 0.1.0



19
20
21
22
23
# File 'lib/torba/remote_sources/github_release.rb', line 19

def initialize(source, tag)
  @source = source
  @tag = tag
  super("https://github.com/#{source}/archive/#{tag}.zip")
end

Instance Attribute Details

#sourceString (readonly)

Returns repository user and name.

Examples:

"jashkenas/underscore"

Returns:

  • (String)

    repository user and name.

Since:

  • 0.1.0



10
11
12
# File 'lib/torba/remote_sources/github_release.rb', line 10

def source
  @source
end

#tagString (readonly)

Returns repository tag.

Examples:

"v1.8.3"

Returns:

  • (String)

    repository tag.

Since:

  • 0.1.0



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

def tag
  @tag
end