Class: CompareLinker::GithubTagFinder
- Inherits:
-
Object
- Object
- CompareLinker::GithubTagFinder
- Defined in:
- lib/compare_linker/github_tag_finder.rb
Instance Attribute Summary collapse
-
#octokit ⇒ Object
readonly
Returns the value of attribute octokit.
Instance Method Summary collapse
- #find(repo_full_name, gem_version) ⇒ Object
-
#initialize(octokit) ⇒ GithubTagFinder
constructor
A new instance of GithubTagFinder.
Constructor Details
#initialize(octokit) ⇒ GithubTagFinder
Returns a new instance of GithubTagFinder.
5 6 7 |
# File 'lib/compare_linker/github_tag_finder.rb', line 5 def initialize(octokit) @octokit = octokit end |
Instance Attribute Details
#octokit ⇒ Object (readonly)
Returns the value of attribute octokit.
3 4 5 |
# File 'lib/compare_linker/github_tag_finder.rb', line 3 def octokit @octokit end |
Instance Method Details
#find(repo_full_name, gem_version) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/compare_linker/github_tag_finder.rb', line 9 def find(repo_full_name, gem_version) = octokit.(repo_full_name) if .find { |tag| tag.name == gem_version || tag.name == "v#{gem_version}" } end end |