Class: Cask::InstallStepsContext Private
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.
Minimal cask state needed to resolve structured install-step paths and tokens.
Instance Attribute Summary collapse
- #arch ⇒ String? readonly private
- #caskroom_path ⇒ Pathname readonly private
- #config ⇒ Config readonly private
- #home ⇒ Pathname readonly private
- #name ⇒ String+ readonly private
- #staged_path ⇒ Pathname readonly private
- #token ⇒ String readonly private
- #version ⇒ String readonly private
Instance Method Summary collapse
- #initialize(context) ⇒ void constructor private
Constructor Details
#initialize(context) ⇒ 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.
46 47 48 49 50 51 52 53 54 55 |
# File 'cask_artifact.rb', line 46 def initialize(context) @name = T.let(context.fetch("name"), T.any(String, T::Array[String])) @token = T.let(context.fetch("token"), String) @arch = T.let(context["arch"], T.nilable(String)) @version = T.let(context.fetch("version"), String) @staged_path = T.let(Pathname(context.fetch("staged_path")), Pathname) @caskroom_path = T.let(Pathname(context.fetch("caskroom_path")), Pathname) @home = T.let(Pathname(context.fetch("home")), Pathname) @config = T.let(Config.from_json(context.fetch("config"), ignore_invalid_keys: true), Config) end |
Instance Attribute Details
#arch ⇒ String? (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.
28 29 30 |
# File 'cask_artifact.rb', line 28 def arch @arch end |
#caskroom_path ⇒ Pathname (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.
37 38 39 |
# File 'cask_artifact.rb', line 37 def caskroom_path @caskroom_path end |
#config ⇒ Config (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.
43 44 45 |
# File 'cask_artifact.rb', line 43 def config @config end |
#home ⇒ Pathname (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.
40 41 42 |
# File 'cask_artifact.rb', line 40 def home @home end |
#name ⇒ String+ (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.
22 23 24 |
# File 'cask_artifact.rb', line 22 def name @name end |
#staged_path ⇒ Pathname (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.
34 35 36 |
# File 'cask_artifact.rb', line 34 def staged_path @staged_path end |
#token ⇒ String (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.
25 26 27 |
# File 'cask_artifact.rb', line 25 def token @token end |
#version ⇒ String (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.
31 32 33 |
# File 'cask_artifact.rb', line 31 def version @version end |