Class: Cask::Artifact::Manpage Private
- Defined in:
- cask/artifact/manpage.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 manpage stanza.
Constant Summary
Constants inherited from AbstractArtifact
AbstractArtifact::DirectivesType
Instance Attribute Summary collapse
- #section ⇒ Object readonly private
Attributes inherited from AbstractArtifact
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cask, source, section) ⇒ Manpage
constructor
private
A new instance of Manpage.
- #resolve_target(target) ⇒ Object private
Methods inherited from Symlinked
english_description, #install_phase, link_type_english_name, #summarize_installed, #uninstall_phase
Methods included from OS::Mac::Cask::Artifact::Symlinked
Methods inherited from Relocated
#source, #summarize, #target, #to_a
Methods included from OS::Linux::Cask::Artifact::Relocated
Methods inherited from AbstractArtifact
#config, dirmethod, dsl_key, english_article, english_name, 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_deprecated, #pretty_disabled, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled
Constructor Details
#initialize(cask, source, section) ⇒ Manpage
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.
Returns a new instance of Manpage.
20 21 22 23 24 |
# File 'cask/artifact/manpage.rb', line 20 def initialize(cask, source, section) @section = section super(cask, source) end |
Instance Attribute Details
#section ⇒ Object (readonly)
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.
10 11 12 |
# File 'cask/artifact/manpage.rb', line 10 def section @section end |
Class Method Details
.from_args(cask, source) ⇒ 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.
12 13 14 15 16 17 18 |
# File 'cask/artifact/manpage.rb', line 12 def self.from_args(cask, source) section = source.to_s[/\.([1-8]|n|l)(?:\.gz)?$/, 1] raise CaskInvalidError, "'#{source}' is not a valid man page name" unless section new(cask, source, section) end |
Instance Method Details
#resolve_target(target) ⇒ 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.
26 27 28 |
# File 'cask/artifact/manpage.rb', line 26 def resolve_target(target) config.manpagedir.join("man#{section}", target) end |