Class: Cask::Artifact::Artifact Private
- Defined in:
- cask/artifact/artifact.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Generic artifact corresponding to the artifact
stanza.
Instance Attribute Summary
Attributes inherited from AbstractArtifact
Class Method Summary collapse
- .english_name ⇒ String private
- .from_args(cask, *args) ⇒ T.attached_class private
Instance Method Summary collapse
Methods inherited from Moved
english_description, #install_phase, #summarize_installed, #uninstall_phase
Methods inherited from Relocated
#initialize, #source, #summarize, #target, #to_a
Methods inherited from AbstractArtifact
#config, dirmethod, dsl_key, english_article, #initialize, read_script_arguments, #staged_path_join_executable, #summarize, #to_args
Constructor Details
This class inherits a constructor from Cask::Artifact::Relocated
Class Method Details
.english_name ⇒ String
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
11 12 13 |
# File 'cask/artifact/artifact.rb', line 11 def self.english_name "Generic Artifact" end |
.from_args(cask, *args) ⇒ T.attached_class
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'cask/artifact/artifact.rb', line 16 def self.from_args(cask, *args) source, = args raise CaskInvalidError.new(cask.token, "No source provided for #{english_name}.") if source.blank? unless &.key?(:target) raise CaskInvalidError.new(cask.token, "#{english_name} '#{source}' requires a target.") end new(cask, source, **) end |
Instance Method Details
#resolve_target(target) ⇒ Pathname
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
29 30 31 |
# File 'cask/artifact/artifact.rb', line 29 def resolve_target(target) super(target, base_dir: nil) end |