Class: Utils::Bottles::Collector Private
- Includes:
- OS::Mac::Bottles::Collector
- Defined in:
- 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
- #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.
329 330 331 |
# File 'utils/bottles.rb', line 329 def initialize @tag_specs = T.let({}, T::Hash[Utils::Bottles::Tag, Utils::Bottles::TagSpecification]) end |
Instance Method Details
#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.
349 350 351 352 |
# File 'utils/bottles.rb', line 349 def add(tag, checksum:, cellar:) spec = Utils::Bottles::TagSpecification.new(tag:, checksum:, 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.
361 362 363 |
# File 'utils/bottles.rb', line 361 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.
369 370 371 372 |
# File 'utils/bottles.rb', line 369 def specification_for(tag, no_older_versions: false) tag = find_matching_tag(tag, 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.
355 356 357 358 |
# File 'utils/bottles.rb', line 355 def tag?(tag, no_older_versions: false) tag = find_matching_tag(tag, 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.
334 335 336 |
# File 'utils/bottles.rb', line 334 def @tag_specs.keys end |