Class: Cask::Artifact::ZshCompletion Private
- Inherits:
-
ShellCompletion
- Object
- AbstractArtifact
- Relocated
- Symlinked
- ShellCompletion
- Cask::Artifact::ZshCompletion
- Defined in:
- cask/artifact/zshcompletion.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.
Artifact corresponding to the zsh_completion
stanza.
Instance Attribute Summary
Attributes inherited from AbstractArtifact
Instance Method Summary collapse
Methods inherited from ShellCompletion
Methods inherited from Symlinked
english_description, #install_phase, link_type_english_name, #summarize_installed, #uninstall_phase
Methods included from OS::Linux::Cask::Artifact::Symlinked
Methods included from OS::Mac::Cask::Artifact::Symlinked
Methods inherited from Relocated
from_args, #initialize, #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
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.
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'cask/artifact/zshcompletion.rb', line 11 def resolve_target(target) name = if target.to_s.start_with? "_" target else new_name = "_#{File.basename(target, File.extname(target))}" odebug "Renaming completion #{target} to #{new_name}" new_name end config.zsh_completion/name end |