Class: Cask::Artifact::Artifact Private
- Inherits:
-
Moved
- Object
- AbstractArtifact
- Relocated
- Moved
- Cask::Artifact::Artifact
- Defined in:
- Library/Homebrew/cask/artifact/artifact.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Generic artifact corresponding to the artifact
stanza.
Instance Attribute Summary
Attributes inherited from Relocated
Attributes inherited from AbstractArtifact
Class Method Summary collapse
- .english_name ⇒ Object private
- .from_args(cask, *args) ⇒ Object private
Instance Method Summary collapse
-
#initialize(cask, source, target: nil) ⇒ Artifact
constructor
private
A new instance of Artifact.
- #resolve_target(target) ⇒ Object private
Methods inherited from Moved
english_description, #install_phase, #summarize_installed, #uninstall_phase
Methods inherited from Relocated
Methods inherited from AbstractArtifact
#<=>, #config, dirmethod, dsl_key, english_article, read_script_arguments, #staged_path_join_executable, #to_s
Methods included from Predicable
Constructor Details
#initialize(cask, source, target: nil) ⇒ Artifact
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Artifact.
37 38 39 |
# File 'Library/Homebrew/cask/artifact/artifact.rb', line 37 def initialize(cask, source, target: nil) super(cask, source, target: target) end |
Class Method Details
.english_name ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
15 16 17 |
# File 'Library/Homebrew/cask/artifact/artifact.rb', line 15 def self.english_name "Generic Artifact" end |
.from_args(cask, *args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'Library/Homebrew/cask/artifact/artifact.rb', line 19 def self.from_args(cask, *args) source_string, target_hash = args raise CaskInvalidError.new(cask.token, "no source given for #{english_name}") if source_string.nil? unless target_hash.is_a?(Hash) raise CaskInvalidError.new(cask.token, "target required for #{english_name} '#{source_string}'") end target_hash.assert_valid_keys!(:target) new(cask, source_string, **target_hash) end |
Instance Method Details
#resolve_target(target) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 |
# File 'Library/Homebrew/cask/artifact/artifact.rb', line 33 def resolve_target(target) Pathname(target) end |