Class: Utils::Bottles::Collector Private
- Defined in:
- utils/bottles.rb,
extend/os/mac/utils/bottles.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.
Collector for bottle specifications.
Instance Method Summary collapse
-
#==(other) ⇒ Object
(also: #eql?)
private
-
#add(tag, checksum:, cellar:) ⇒ void
private
-
#each_tag(&block) ⇒ void
private
-
#initialize ⇒ void
constructor
private
-
#specification_for(tag, no_older_versions: false) ⇒ Utils::Bottles::TagSpecification?
private
-
#tag?(tag, no_older_versions: false) ⇒ Boolean
private
-
#tags ⇒ Array<Utils::Bottles::Tag>
private
Constructor Details
#initialize ⇒ 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.
275 276 277 |
# File 'utils/bottles.rb', line 275 def initialize @tag_specs = T.let({}, T::Hash[Utils::Bottles::Tag, Utils::Bottles::TagSpecification]) end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
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.
284 285 286 |
# File 'utils/bottles.rb', line 284 def ==(other) self.class == other.class && @tag_specs == other.instance_variable_get(:@tag_specs) end |
#add(tag, checksum:, cellar:) ⇒ 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.
This method returns an undefined value.
290 291 292 293 |
# File 'utils/bottles.rb', line 290 def add(tag, checksum:, cellar:) spec = Utils::Bottles::TagSpecification.new(tag: tag, checksum: checksum, cellar: cellar) @tag_specs[tag] = spec end |
#each_tag(&block) ⇒ 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.
This method returns an undefined value.
302 303 304 |
# File 'utils/bottles.rb', line 302 def each_tag(&block) @tag_specs.each_key(&block) end |
#specification_for(tag, no_older_versions: false) ⇒ Utils::Bottles::TagSpecification?
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.
310 311 312 313 |
# File 'utils/bottles.rb', line 310 def specification_for(tag, no_older_versions: false) tag = find_matching_tag(tag, no_older_versions: no_older_versions) @tag_specs[tag] if tag end |
#tag?(tag, no_older_versions: 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.
296 297 298 299 |
# File 'utils/bottles.rb', line 296 def tag?(tag, no_older_versions: false) tag = find_matching_tag(tag, no_older_versions: no_older_versions) tag.present? end |
#tags ⇒ Array<Utils::Bottles::Tag>
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.
280 281 282 |
# File 'utils/bottles.rb', line 280 def @tag_specs.keys end |