Class: Metanorma::Release::Platform::GitHub::ReleaseFetcher
- Inherits:
-
Object
- Object
- Metanorma::Release::Platform::GitHub::ReleaseFetcher
- Includes:
- ReleaseFetcher
- Defined in:
- lib/metanorma/release/platform/github/release_fetcher.rb
Instance Method Summary collapse
- #fetch(repo, etag: nil) ⇒ Object
-
#initialize(client:) ⇒ ReleaseFetcher
constructor
A new instance of ReleaseFetcher.
Constructor Details
#initialize(client:) ⇒ ReleaseFetcher
Returns a new instance of ReleaseFetcher.
16 17 18 |
# File 'lib/metanorma/release/platform/github/release_fetcher.rb', line 16 def initialize(client:) @client = client end |
Instance Method Details
#fetch(repo, etag: nil) ⇒ Object
20 21 22 23 24 |
# File 'lib/metanorma/release/platform/github/release_fetcher.rb', line 20 def fetch(repo, etag: nil) releases = @client.releases(repo.to_s) parsed = releases.map { |r| parse_release(r) } FetchResult.new(releases: parsed, etag: "etag-#{repo}", unchanged?: false) end |