Class: Moku::Task::DownloadReferences

Inherits:
Task
  • Object
show all
Defined in:
lib/moku/task/download_references.rb

Overview

Download and merge an artifact's files as defined by its source, infrastructure, and dev directories.

Instance Method Summary collapse

Methods inherited from Task

#to_s

Constructor Details

#initialize(ref_repo: Moku.ref_repo) ⇒ DownloadReferences

Returns a new instance of DownloadReferences.


13
14
15
# File 'lib/moku/task/download_references.rb', line 13

def initialize(ref_repo: Moku.ref_repo)
  @ref_repo = ref_repo
end

Instance Method Details

#call(artifact) ⇒ Object

Parameters:


18
19
20
21
22
23
# File 'lib/moku/task/download_references.rb', line 18

def call(artifact)
  add_reference(artifact.source, artifact.path)
  add_reference(artifact.infrastructure, artifact.path)
  add_reference(artifact.dev, artifact.path)
  Status.success
end