Class: Rexer::Source::Github

Inherits:
Git
  • Object
show all
Defined in:
lib/rexer/source/github.rb

Instance Method Summary collapse

Methods inherited from Git

#load, #updatable?, #update

Methods inherited from Base

#load, #updatable?, #update

Constructor Details

#initialize(repo:, branch: nil, tag: nil, ref: nil) ⇒ Github

Returns a new instance of Github.



4
5
6
7
# File 'lib/rexer/source/github.rb', line 4

def initialize(repo:, branch: nil, tag: nil, ref: nil)
  @repo = repo
  super(url: "https://github.com/#{repo}", branch: branch, tag: tag, ref: ref)
end

Instance Method Details

#info(work_dir = nil) ⇒ Object



9
10
11
# File 'lib/rexer/source/github.rb', line 9

def info(work_dir = nil)
  [@repo, reference(short_ref: true) || current_branch(work_dir)].compact.join("@")
end