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
-
#initialize(cask, source, target:) ⇒ void
constructor
private
-
#resolve_target(target) ⇒ Pathname
private
Methods inherited from Moved
english_description, #install_phase, #summarize_installed, #uninstall_phase
Methods inherited from Relocated
#source, #summarize, #target, #to_a
Methods inherited from AbstractArtifact
#<=>, #config, dirmethod, dsl_key, english_article, read_script_arguments, #staged_path_join_executable, #summarize, #to_args, #to_s
Methods included from Predicable
Constructor Details
#initialize(cask, source, target:) ⇒ void
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.
36 37 38 |
# File 'cask/artifact/artifact.rb', line 36 def initialize(cask, source, target:) super(cask, source, target: target) end |
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.
13 14 15 |
# File 'cask/artifact/artifact.rb', line 13 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.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'cask/artifact/artifact.rb', line 18 def self.from_args(cask, *args) source, = args raise CaskInvalidError.new(cask.token, "No source provided for #{english_name}.") if source.blank? unless .try(: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.
31 32 33 |
# File 'cask/artifact/artifact.rb', line 31 def resolve_target(target) super(target, base_dir: nil) end |