aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/software_spec.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-02-14 19:56:48 +0000
committerMike McQuaid2016-02-18 10:21:20 +0000
commit74858b28c5c66a792718b2b3d694ce8dc4144857 (patch)
tree20bb15230313e7bb887361a66ff68b53ac96911e /Library/Homebrew/software_spec.rb
parentbff90a72339b4b9b38ecfd2ec52440c865364b48 (diff)
downloadbrew-74858b28c5c66a792718b2b3d694ce8dc4144857.tar.bz2
software_spec: add new bottle check class.
Diffstat (limited to 'Library/Homebrew/software_spec.rb')
-rw-r--r--Library/Homebrew/software_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb
index 2edc51a07..41e2803bd 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