Class: Cask::InstallStepsContext Private

Inherits:
Object
  • Object
show all
Defined in:
cask_artifact.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.

Minimal cask state needed to resolve structured install-step paths and tokens.

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:



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

#archString? (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:



28
29
30
# File 'cask_artifact.rb', line 28

def arch
  @arch
end

#caskroom_pathPathname (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:



37
38
39
# File 'cask_artifact.rb', line 37

def caskroom_path
  @caskroom_path
end

#configConfig (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:



43
44
45
# File 'cask_artifact.rb', line 43

def config
  @config
end

#homePathname (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:



40
41
42
# File 'cask_artifact.rb', line 40

def home
  @home
end

#nameString+ (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:



22
23
24
# File 'cask_artifact.rb', line 22

def name
  @name
end

#staged_pathPathname (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:



34
35
36
# File 'cask_artifact.rb', line 34

def staged_path
  @staged_path
end

#tokenString (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:



25
26
27
# File 'cask_artifact.rb', line 25

def token
  @token
end

#versionString (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:



31
32
33
# File 'cask_artifact.rb', line 31

def version
  @version
end