Class: Cask::DSL::DependsOn Private
- Includes:
- Kernel
- Defined in:
- cask/dsl/depends_on.rb,
cask/dsl/depends_on.rbi
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.
Constant Summary collapse
- VALID_KEYS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
Set.new([ :formula, :cask, :macos, :arch, ]).freeze
- VALID_ARCHES =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
{ intel: { type: :intel, bits: 64 }, # specific x86_64: { type: :intel, bits: 64 }, arm64: { type: :arm, bits: 64 }, }.freeze
Constants included from Kernel
Kernel::IGNORE_INTERRUPTS_MUTEX
Instance Attribute Summary collapse
- #arch ⇒ Object private
- #cask ⇒ Object private
- #formula ⇒ Object private
- #macos ⇒ Object private
Instance Method Summary collapse
-
#initialize ⇒ DependsOn
constructor
private
A new instance of DependsOn.
- #load(**pairs) ⇒ Object private
Methods included from Kernel
#disk_usage_readable, #ensure_executable!, #ensure_formula_installed!, #exec_browser, #exec_editor, #ignore_interrupts, #interactive_shell, #number_readable, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #paths, #pretty_duration, #pretty_installed, #pretty_outdated, #pretty_uninstalled, #quiet_system, #redact_secrets, #redirect_stdout, #require?, #safe_system, #tap_and_name_comparison, #truncate_text_to_approximate_size, #which, #which_all, #which_editor, #with_custom_locale, #with_env, #with_homebrew_path
Constructor Details
#initialize ⇒ DependsOn
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 DependsOn.
28 29 30 31 32 |
# File 'cask/dsl/depends_on.rb', line 28 def initialize super({}) @cask ||= [] @formula ||= [] end |
Instance Attribute Details
#arch ⇒ 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 |
# File 'cask/dsl/depends_on.rb', line 26 def arch @arch end |
#cask ⇒ 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 |
# File 'cask/dsl/depends_on.rb', line 26 def cask @cask end |
#formula ⇒ 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 |
# File 'cask/dsl/depends_on.rb', line 26 def formula @formula end |
#macos ⇒ 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 |
# File 'cask/dsl/depends_on.rb', line 26 def macos @macos end |
Instance Method Details
#load(**pairs) ⇒ 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.
34 35 36 37 38 39 40 |
# File 'cask/dsl/depends_on.rb', line 34 def load(**pairs) pairs.each do |key, value| raise "invalid depends_on key: '#{key.inspect}'" unless VALID_KEYS.include?(key) __getobj__[key] = send(:"#{key}=", *value) end end |