From 74858b28c5c66a792718b2b3d694ce8dc4144857 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 14 Feb 2016 19:56:48 +0000 Subject: [PATCH] software_spec: add new bottle check class. --- Library/Homebrew/software_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 2edc51a073..41e2803bd3 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -344,3 +344,17 @@ class BottleSpecification checksums end end + +class PourBottleCheck + def initialize(formula) + @formula = formula + end + + def reason(reason) + @formula.pour_bottle_check_unsatisfied_reason(reason) + end + + def satisfy(&block) + @formula.send(:define_method, :pour_bottle?, &block) + end +end