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
- #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.
42 43 44 45 46 47 48 49 50 |
# File 'cask_artifact.rb', line 42 def initialize(context) @name = T.let(context.fetch("name"), T.any(String, T::Array[String])) @token = T.let(context.fetch("token"), 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")), Config) end |
Instance Attribute Details
#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.
33 34 35 |
# File 'cask_artifact.rb', line 33 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.
39 40 41 |
# File 'cask_artifact.rb', line 39 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.
36 37 38 |
# File 'cask_artifact.rb', line 36 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.
21 22 23 |
# File 'cask_artifact.rb', line 21 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.
30 31 32 |
# File 'cask_artifact.rb', line 30 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.
24 25 26 |
# File 'cask_artifact.rb', line 24 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.
27 28 29 |
# File 'cask_artifact.rb', line 27 def version @version end |