Logo
Explore Help
Sign In
admin/brew
1
0
Fork 0
You've already forked brew
Code Issues Packages Projects Releases 6 Wiki Activity
brew/Library/Homebrew/extend/cachable.rb

15 lines
257 B
Ruby
Raw Normal View History

cachable: Move registry to test directory Now we only include the cachable registry when running tests. We basically just load it first and add a bunch of methods to it before loading the rest of the formula files when we require global.rb. I added a check to make sure this require order is preserved. I also made a bunch of methods private, stop excluding classes that inherit from casks since it's unnecessary and add more docs.
2024-02-26 20:26:06 -08:00
# typed: strict
Add frozen_string_literal to all files.
2019-04-19 15:38:03 +09:00
# frozen_string_literal: true
Clean up code style and remove `.rubocop_todo.yml`.
2017-10-07 00:31:28 +02:00
module Cachable
Turn up the types
2023-08-08 13:54:59 -07:00
sig { returns(T::Hash[T.untyped, T.untyped]) }
Clean up code style and remove `.rubocop_todo.yml`.
2017-10-07 00:31:28 +02:00
def cache
Turn up the types
2023-08-08 13:54:59 -07:00
@cache ||= T.let({}, T.nilable(T::Hash[T.untyped, T.untyped]))
Clean up code style and remove `.rubocop_todo.yml`.
2017-10-07 00:31:28 +02:00
end
Turn up the types
2023-08-08 13:54:59 -07:00
sig { void }
Clean up code style and remove `.rubocop_todo.yml`.
2017-10-07 00:31:28 +02:00
def clear_cache
cache.clear
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 1557ms Template: 17ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API