Class: Cask::Artifact::Pkg Private
- Inherits:
-
AbstractArtifact
- Object
- AbstractArtifact
- Cask::Artifact::Pkg
- Defined in:
- Library/Homebrew/cask/artifact/pkg.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Artifact corresponding to the pkg
stanza.
Instance Attribute Summary collapse
- #path ⇒ Object readonly private
- #pkg_relative_path ⇒ Object readonly private
- #stanza_options ⇒ Object readonly private
Attributes inherited from AbstractArtifact
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cask, path, **stanza_options) ⇒ Pkg
constructor
private
A new instance of Pkg.
- #install_phase(**options) ⇒ Object private
- #summarize ⇒ Object private
Methods inherited from AbstractArtifact
#<=>, #config, dirmethod, dsl_key, english_article, english_name, read_script_arguments, #staged_path_join_executable, #to_s
Methods included from Predicable
Constructor Details
#initialize(cask, path, **stanza_options) ⇒ Pkg
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Pkg.
25 26 27 28 29 |
# File 'Library/Homebrew/cask/artifact/pkg.rb', line 25 def initialize(cask, path, **) super(cask) @path = cask.staged_path.join(path) @stanza_options = end |
Instance Attribute Details
#path ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'Library/Homebrew/cask/artifact/pkg.rb', line 18 def path @path end |
#pkg_relative_path ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'Library/Homebrew/cask/artifact/pkg.rb', line 18 def pkg_relative_path @pkg_relative_path end |
#stanza_options ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'Library/Homebrew/cask/artifact/pkg.rb', line 18 def @stanza_options end |
Class Method Details
.from_args(cask, path, **stanza_options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 |
# File 'Library/Homebrew/cask/artifact/pkg.rb', line 20 def self.from_args(cask, path, **) .assert_valid_keys!(:allow_untrusted, :choices) new(cask, path, **) end |
Instance Method Details
#install_phase(**options) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
35 36 37 |
# File 'Library/Homebrew/cask/artifact/pkg.rb', line 35 def install_phase(**) run_installer(**) end |
#summarize ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
31 32 33 |
# File 'Library/Homebrew/cask/artifact/pkg.rb', line 31 def summarize path.relative_path_from(cask.staged_path).to_s end |