Module: Homepage::DSL Private
Overview
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
The homepage URL and the date a human last checked that URL.
Instance Attribute Summary collapse
- #homepage_browsed ⇒ Date? readonly private
Instance Method Summary collapse
-
#homepage(url = nil, browsed: nil) ⇒ String?
Sets or reads the package homepage, which users can open with
brew home.
Instance Attribute Details
#homepage_browsed ⇒ Date? (readonly)
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.
11 12 13 |
# File 'homepage/dsl.rb', line 11 def homepage_browsed @homepage_browsed end |
Instance Method Details
#homepage(url = nil, browsed: nil) ⇒ String?
Sets or reads the package homepage, which users can open with brew home.
browsed is the date a human last checked this URL in a browser.
Automated homepage availability audits are skipped for one year.
homepage "https://www.example.com", browsed: "2026-07-26"
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'homepage/dsl.rb', line 23 def homepage(url = nil, browsed: nil) if url.nil? Kernel.raise ArgumentError, "`browsed` requires a homepage URL" if browsed return @homepage end if browsed @homepage_browsed = T.let(Date.parse(browsed), T.nilable(Date)) elsif url != @homepage @homepage_browsed = nil end @homepage = T.let(url, T.nilable(String)) end |