Class: RuboCop::Cop::Cask::Variables Private
- Extended by:
- AutoCorrector, Forwardable
- Includes:
- CaskHelp
- Defined in:
- rubocops/cask/variables.rb,
sorbet/rbi/dsl/rubo_cop/cop/cask/variables.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.
This cop audits variables in casks.
Example
# bad
cask do
arch = Hardware::CPU.intel? ? "darwin" : "darwin-arm64"
end
# good
cask 'foo' do
arch arm: "darwin-arm64", intel: "darwin"
end
Instance Method Summary collapse
- #cask_node(*args, &block) ⇒ T.untyped private
- #on_cask(cask_block) ⇒ Object private
- #variable_assignment(node, *pattern, **kwargs, &block) ⇒ T.untyped private
Methods included from CaskHelp
#cask_tap, #inner_stanzas, #on_block, #on_cask_stanza_block, #on_system_methods
Instance Method Details
#cask_node(*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/rubo_cop/cop/cask/variables.rbi', line 10 def cask_node(*args, &block); end |
#on_cask(cask_block) ⇒ 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.
29 30 31 32 |
# File 'rubocops/cask/variables.rb', line 29 def on_cask(cask_block) @cask_block = cask_block add_offenses end |
#variable_assignment(node, *pattern, **kwargs, &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.
20 |
# File 'sorbet/rbi/dsl/rubo_cop/cop/cask/variables.rbi', line 20 def variable_assignment(node, *pattern, **kwargs, &block); end |