Class: Utils::Bottles::Collector

Inherits:
Object
  • Object
show all
Defined in:
Library/Homebrew/utils/bottles.rb,
Library/Homebrew/extend/os/mac/utils/bottles.rb

Instance Method Summary collapse

Constructor Details

#initializeCollector

Returns a new instance of Collector



86
87
88
# File 'Library/Homebrew/utils/bottles.rb', line 86

def initialize
  @checksums = {}
end

Instance Method Details

#[](key) ⇒ Object



99
100
101
# File 'Library/Homebrew/utils/bottles.rb', line 99

def [](key)
  @checksums[key]
end

#[]=(key, value) ⇒ Object



103
104
105
# File 'Library/Homebrew/utils/bottles.rb', line 103

def []=(key, value)
  @checksums[key] = value
end

#fetch_checksum_for(tag) ⇒ Object



90
91
92
93
# File 'Library/Homebrew/utils/bottles.rb', line 90

def fetch_checksum_for(tag)
  tag = find_matching_tag(tag)
  return self[tag], tag if tag
end

#key?(key) ⇒ Boolean

Returns:

  • (Boolean)


107
108
109
# File 'Library/Homebrew/utils/bottles.rb', line 107

def key?(key)
  @checksums.key?(key)
end

#keysObject



95
96
97
# File 'Library/Homebrew/utils/bottles.rb', line 95

def keys
  @checksums.keys
end