aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorJack Nagel2015-01-20 22:25:24 -0500
committerJack Nagel2015-01-20 22:27:23 -0500
commitaf1e9a9610f39480f8a476f4f960e111aa000ff4 (patch)
treeb6387da995411579011e18d7ae1c03e1a2b1301d /Library/Homebrew/formula.rb
parent8b793c6ab388ed606ac0ff550ca98920c22226f2 (diff)
downloadbrew-af1e9a9610f39480f8a476f4f960e111aa000ff4.tar.bz2
Expose bottle details on the formula object
Fixes Homebrew/homebrew#36032.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 4ecb348e6..f953c087d 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -147,10 +147,20 @@ class Formula
active_spec == head
end
+ # @private
+ def bottled?
+ active_spec.bottled?
+ end
+
+ # @private
+ def bottle_specification
+ active_spec.bottle_specification
+ end
+
# The Bottle object for the currently active {SoftwareSpec}.
# @private
def bottle
- Bottle.new(self, active_spec.bottle_specification) if active_spec.bottled?
+ Bottle.new(self, bottle_specification) if bottled?
end
# The homepage for the software.