From 3a4c7223df13161c834d85258ba8567c5e55a722 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Tue, 15 Dec 2020 17:25:16 +0100 Subject: [PATCH] Allow accessing version in `livecheck` blocks. --- Library/Homebrew/livecheck.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/livecheck.rb b/Library/Homebrew/livecheck.rb index 2560b80737..43288cdb3c 100644 --- a/Library/Homebrew/livecheck.rb +++ b/Library/Homebrew/livecheck.rb @@ -8,6 +8,8 @@ # This information is used by the `brew livecheck` command to control its # behavior. class Livecheck + extend Forwardable + # A very brief description of why the formula/cask is skipped (e.g. `No longer # developed or maintained`). # @return [String, nil] @@ -107,6 +109,9 @@ class Livecheck end end + delegate version: :@formula_or_cask + private :version + # Returns a `Hash` of all instance variable values. # @return [Hash] def to_hash