Class: Cask::DSL::Base Private
- 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.
Direct Known Subclasses
Caveats, Postflight, Preflight, UninstallPostflight, UninstallPreflight
Instance Method Summary collapse
- #appdir(*args, &block) ⇒ T.untyped private
- #arch(*args, &block) ⇒ T.untyped private
- #caskroom_path(*args, &block) ⇒ T.untyped private
-
#initialize(cask, command = SystemCommand) ⇒ Base
constructor
private
A new instance of Base.
- #language(*args, &block) ⇒ T.untyped private
- #method_missing(method) ⇒ Object private
- #staged_path(*args, &block) ⇒ T.untyped private
- #system_command(executable, **options) ⇒ Object private
- #token(*args, &block) ⇒ T.untyped private
- #version(*args, &block) ⇒ T.untyped private
Constructor Details
#initialize(cask, command = SystemCommand) ⇒ Base
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 a new instance of Base.
13 14 15 16 |
# File 'cask/dsl/base.rb', line 13 def initialize(cask, command = SystemCommand) @cask = cask @command = command end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object
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.
26 27 28 29 30 31 32 33 34 35 |
# File 'cask/dsl/base.rb', line 26 def method_missing(method, *) if method underscored_class = T.must(self.class.name).gsub(/([[:lower:]])([[:upper:]][[:lower:]])/, '\1_\2').downcase section = underscored_class.split("::").last Utils.(method, @cask.to_s, section) nil else super end 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.
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.
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.
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.
19 |
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 19 def language(*args, &block); 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.
22 |
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 22 def staged_path(*args, &block); end |
#system_command(executable, **options) ⇒ Object
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.
20 21 22 |
# File 'cask/dsl/base.rb', line 20 def system_command(executable, **) @command.run!(executable, **) 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.
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.
28 |
# File 'sorbet/rbi/dsl/cask/dsl/base.rbi', line 28 def version(*args, &block); end |