Class: Rexer::Source::Github
Instance Method Summary collapse
- #info(work_dir = nil) ⇒ Object
-
#initialize(repo:, branch: nil, tag: nil, ref: nil) ⇒ Github
constructor
A new instance of Github.
Methods inherited from Git
Methods inherited from Base
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 |