Class: Cask::DSL::DependsOn Private
- Defined in:
- cask/dsl/depends_on.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.
Class corresponding to the depends_on
stanza.
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
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
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.
30 31 32 33 34 |
# File 'cask/dsl/depends_on.rb', line 30 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.
28 29 30 |
# File 'cask/dsl/depends_on.rb', line 28 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.
28 29 30 |
# File 'cask/dsl/depends_on.rb', line 28 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.
28 29 30 |
# File 'cask/dsl/depends_on.rb', line 28 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.
28 29 30 |
# File 'cask/dsl/depends_on.rb', line 28 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.
36 37 38 39 40 41 42 |
# File 'cask/dsl/depends_on.rb', line 36 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 |