Move methods to a more logical place

This commit is contained in:
Jack Nagel 2014-02-21 00:41:07 -05:00
parent 19ca1bb601
commit 129e25032b

View File

@ -123,6 +123,14 @@ class Formula
active_spec.downloader active_spec.downloader
end end
def cached_download
downloader.cached_location
end
def clear_cache
downloader.clear_cache
end
# if the dir is there, but it's empty we consider it not installed # if the dir is there, but it's empty we consider it not installed
def installed? def installed?
(dir = installed_prefix).directory? && dir.children.length > 0 (dir = installed_prefix).directory? && dir.children.length > 0
@ -198,14 +206,6 @@ class Formula
Pathname.new("#{HOMEBREW_PREFIX}/opt/#{name}") Pathname.new("#{HOMEBREW_PREFIX}/opt/#{name}")
end end
def cached_download
downloader.cached_location
end
def clear_cache
downloader.clear_cache
end
# Can be overridden to selectively disable bottles from formulae. # Can be overridden to selectively disable bottles from formulae.
# Defaults to true so overridden version does not have to check if bottles # Defaults to true so overridden version does not have to check if bottles
# are supported. # are supported.