diff options
| author | Jack Nagel | 2014-02-20 13:45:13 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-20 13:45:13 -0500 |
| commit | ccb216c9c7408fd3019b9476d7e420f8d75693a8 (patch) | |
| tree | 95579b6b55179bf9735f43618f5a4b592d66914e /Library | |
| parent | 3aa06a701d2752df874df43cd6ebea618e3e187e (diff) | |
| download | brew-ccb216c9c7408fd3019b9476d7e420f8d75693a8.tar.bz2 | |
Delegate downloader to active_spec instead of storing it in an ivar
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index a17f114f8..86444883a 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -16,7 +16,7 @@ class Formula include Utils::Inreplace extend BuildEnvironmentDSL - attr_reader :name, :path, :homepage, :downloader, :build + attr_reader :name, :path, :homepage, :build attr_reader :stable, :bottle, :devel, :head, :active_spec # The current working directory during builds and tests. @@ -53,7 +53,6 @@ class Formula @active_spec = determine_active_spec validate_attributes :url, :name, :version - @downloader = active_spec.downloader @build = determine_build_options @pin = FormulaPin.new(self) @@ -120,6 +119,10 @@ class Formula active_spec.requirements end + def downloader + active_spec.downloader + end + # if the dir is there, but it's empty we consider it not installed def installed? (dir = installed_prefix).directory? && dir.children.length > 0 |
