Class: Cask::Artifact::ZshCompletion Private

Inherits:
ShellCompletion show all
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

#cask

Instance Method Summary collapse

Methods inherited from Symlinked

english_description, #install_phase, link_type_english_name, #summarize_installed, #uninstall_phase

Methods included from OS::Linux::Cask::Artifact::Symlinked

#create_filesystem_link

Methods included from OS::Mac::Cask::Artifact::Symlinked

#create_filesystem_link

Methods inherited from Relocated

from_args, #initialize, #source, #summarize, #target, #to_a

Methods included from OS::Linux::Cask::Artifact::Relocated

#add_altname_metadata

Methods inherited from AbstractArtifact

#config, dirmethod, dsl_key, english_article, english_name, #initialize, read_script_arguments, #sort_order, #staged_path_join_executable, #summarize, #to_args

Methods included from Utils::Output::Mixin

#odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled

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.

Parameters:

Returns:

 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