Class: Cask::Artifact::AbstractFlightBlock Private
- Inherits:
-
AbstractArtifact
- Object
- AbstractArtifact
- Cask::Artifact::AbstractFlightBlock
- Defined in:
- cask/artifact/abstract_flight_block.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.
Abstract superclass for block artifacts.
Direct Known Subclasses
Instance Attribute Summary collapse
- #directives ⇒ Object readonly private
Attributes inherited from AbstractArtifact
Class Method Summary collapse
- .dsl_key ⇒ Object private
- .uninstall_dsl_key ⇒ Object private
Instance Method Summary collapse
-
#initialize(cask, **directives) ⇒ AbstractFlightBlock
constructor
private
A new instance of AbstractFlightBlock.
- #install_phase ⇒ Object private
- #summarize ⇒ Object private
- #uninstall_phase ⇒ Object private
Methods inherited from AbstractArtifact
#config, dirmethod, english_article, english_name, read_script_arguments, #staged_path_join_executable, #to_args
Constructor Details
#initialize(cask, **directives) ⇒ AbstractFlightBlock
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 AbstractFlightBlock.
20 21 22 23 |
# File 'cask/artifact/abstract_flight_block.rb', line 20 def initialize(cask, **directives) super(cask) @directives = directives end |
Instance Attribute Details
#directives ⇒ 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.
18 19 20 |
# File 'cask/artifact/abstract_flight_block.rb', line 18 def directives @directives end |
Class Method Details
.dsl_key ⇒ 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.
10 11 12 |
# File 'cask/artifact/abstract_flight_block.rb', line 10 def self.dsl_key super.to_s.sub(/_block$/, "").to_sym end |
.uninstall_dsl_key ⇒ 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.
14 15 16 |
# File 'cask/artifact/abstract_flight_block.rb', line 14 def self.uninstall_dsl_key dsl_key.to_s.prepend("uninstall_").to_sym end |
Instance Method Details
#install_phase ⇒ 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.
25 26 27 |
# File 'cask/artifact/abstract_flight_block.rb', line 25 def install_phase(**) abstract_phase(self.class.dsl_key) end |
#summarize ⇒ 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.
33 34 35 |
# File 'cask/artifact/abstract_flight_block.rb', line 33 def summarize directives.keys.map(&:to_s).join(", ") end |
#uninstall_phase ⇒ 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.
29 30 31 |
# File 'cask/artifact/abstract_flight_block.rb', line 29 def uninstall_phase(**) abstract_phase(self.class.uninstall_dsl_key) end |