Class: Cask::Artifact::Symlinked Private
- Inherits:
-
Relocated
- Object
- AbstractArtifact
- Relocated
- Cask::Artifact::Symlinked
- Defined in:
- cask/artifact/symlinked.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.
Superclass for all artifacts which are installed by symlinking them to the target location.
Instance Attribute Summary
Attributes inherited from AbstractArtifact
Class Method Summary collapse
- .english_description ⇒ String private
- .link_type_english_name ⇒ String private
Instance Method Summary collapse
- #install_phase(**options) ⇒ Object private
- #summarize_installed ⇒ Object private
- #uninstall_phase(**options) ⇒ Object private
Methods inherited from Relocated
from_args, #initialize, #resolve_target, #source, #summarize, #target, #to_a
Methods inherited from AbstractArtifact
#config, dirmethod, dsl_key, english_article, english_name, #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_description ⇒ 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.
16 17 18 |
# File 'cask/artifact/symlinked.rb', line 16 def self.english_description "#{english_name} #{link_type_english_name}s" end |
.link_type_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/symlinked.rb', line 11 def self.link_type_english_name "Symlink" end |
Instance Method Details
#install_phase(**options) ⇒ Object
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.
20 21 22 |
# File 'cask/artifact/symlinked.rb', line 20 def install_phase(**) link(**) end |
#summarize_installed ⇒ Object
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.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'cask/artifact/symlinked.rb', line 28 def summarize_installed if target.symlink? && target.exist? && target.readlink.exist? "#{printable_target} -> #{target.readlink} (#{target.readlink.abv})" else string = if target.symlink? "#{printable_target} -> #{target.readlink}" else printable_target end Formatter.error(string, label: "Broken Link") end end |
#uninstall_phase(**options) ⇒ Object
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.
24 25 26 |
# File 'cask/artifact/symlinked.rb', line 24 def uninstall_phase(**) unlink(**) end |