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:



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_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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

def version
  @version
end