Class: Cask::Artifact::AbstractFlightBlock Private

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

PostflightBlock, PreflightBlock

Constant Summary

Constants inherited from AbstractArtifact

Cask::Artifact::AbstractArtifact::DirectivesType

Instance Attribute Summary collapse

Attributes inherited from AbstractArtifact

#cask

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractArtifact

#config, dirmethod, english_article, english_name, read_script_arguments, #sort_order, #staged_path_join_executable, #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, **directives) ⇒ void

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:



24
25
26
27
# File 'cask/artifact/abstract_flight_block.rb', line 24

def initialize(cask, **directives)
  super(cask)
  @directives = directives
end

Instance Attribute Details

#directivesHash{Symbol => DirectivesType} (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.

Returns:



21
22
23
# File 'cask/artifact/abstract_flight_block.rb', line 21

def directives
  @directives
end

Class Method Details

.dsl_keySymbol

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:



11
12
13
# File 'cask/artifact/abstract_flight_block.rb', line 11

def self.dsl_key
  super.to_s.sub(/_block$/, "").to_sym
end

.uninstall_dsl_keySymbol

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:



16
17
18
# File 'cask/artifact/abstract_flight_block.rb', line 16

def self.uninstall_dsl_key
  :"uninstall_#{dsl_key}"
end

Instance Method Details

#install_phase(**_options) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • _options (T.anything)


30
31
32
# File 'cask/artifact/abstract_flight_block.rb', line 30

def install_phase(**_options)
  abstract_phase(self.class.dsl_key)
end

#summarizeString

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:



40
41
42
# File 'cask/artifact/abstract_flight_block.rb', line 40

def summarize
  directives.keys.map(&:to_s).join(", ")
end

#uninstall_phase(**_options) ⇒ void

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.

This method returns an undefined value.

Parameters:

  • _options (T.anything)


35
36
37
# File 'cask/artifact/abstract_flight_block.rb', line 35

def uninstall_phase(**_options)
  abstract_phase(self.class.uninstall_dsl_key)
end