Class: Sleet::ArtifactDownloader

Inherits:
Object
  • Object
show all
Defined in:
lib/sleet/artifact_downloader.rb

Instance Method Summary collapse

Constructor Details

#initialize(circle_ci_token:, artifacts:, file_name:) ⇒ ArtifactDownloader

Returns a new instance of ArtifactDownloader.



5
6
7
8
9
# File 'lib/sleet/artifact_downloader.rb', line 5

def initialize(circle_ci_token:, artifacts:, file_name:)
  @circle_ci_token = circle_ci_token
  @artifacts = artifacts
  @file_name = file_name
end

Instance Method Details

#filesObject



11
12
13
14
15
# File 'lib/sleet/artifact_downloader.rb', line 11

def files
  @files ||= urls.map do |url|
    Sleet::CircleCi.get(url, circle_ci_token)
  end.map(&:body)
end