Class: Cask::DSL::Base Private

Inherits:
Object show all
Extended by:
Forwardable
Defined in:
cask/dsl/base.rb,
sorbet/rbi/dsl/cask/dsl/base.rbi

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.

Superclass for all stanzas which take a block.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cask, command = SystemCommand) ⇒ 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:



19
20
21
22
# File 'cask/dsl/base.rb', line 19

def initialize(cask, command = SystemCommand)
  @cask = cask
  @command = T.let(command, T.class_of(SystemCommand))
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *_args) ⇒ T.noreturn

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:

  • method (Symbol)
  • _args (T.untyped)

Returns:

  • (T.noreturn)

Raises:

  • (NoMethodError)


32
33
34
# File 'cask/dsl/base.rb', line 32

def method_missing(method, *_args)
  raise NoMethodError, "undefined method '#{method}' for Cask '#{@cask}'"
end

Instance Attribute Details

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



13
14
15
# File 'cask/dsl/base.rb', line 13

def cask
  @cask
end

#commandT.class_of(SystemCommand) (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:



16
17
18
# File 'cask/dsl/base.rb', line 16

def command
  @command
end

Instance Method Details

#appdir(*args, &block) ⇒ T.untyped

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:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


10
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 10

def appdir(*args, &block); end

#arch(*args, &block) ⇒ T.untyped

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:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


13
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 13

def arch(*args, &block); end

#caskroom_path(*args, &block) ⇒ T.untyped

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:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


16
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 16

def caskroom_path(*args, &block); end

#language(*args, &block) ⇒ T.untyped

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:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


19
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 19

def language(*args, &block); end

#respond_to_missing?(_method, _include_private = false) ⇒ Boolean

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:

  • _method (Symbol)
  • _include_private (Boolean) (defaults to: false)

Returns:

  • (Boolean)


37
38
39
# File 'cask/dsl/base.rb', line 37

def respond_to_missing?(_method, _include_private = false)
  false
end

#staged_path(*args, &block) ⇒ T.untyped

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:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


22
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 22

def staged_path(*args, &block); end

#system_command(executable, **options) ⇒ SystemCommand::Result?

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:

  • executable (String)
  • options (T.untyped)

Returns:



27
28
29
# File 'cask/dsl/base.rb', line 27

def system_command(executable, **options)
  @command.run!(executable, **options)
end

#token(*args, &block) ⇒ T.untyped

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:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


25
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 25

def token(*args, &block); end

#version(*args, &block) ⇒ T.untyped

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:

  • args (T.untyped)
  • block (T.untyped)

Returns:

  • (T.untyped)


28
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 28

def version(*args, &block); end