Use ivar accessors

This commit is contained in:
Jack Nagel 2013-06-06 12:02:25 -05:00
parent 92d65aace7
commit 856cebd9b4
2 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ class Formula
@active_spec = determine_active_spec
validate_attributes :url, :name, :version
@downloader = download_strategy.new(name, @active_spec)
@downloader = download_strategy.new(name, active_spec)
# Combine DSL `option` and `def options`
options.each do |opt, desc|

View File

@ -16,11 +16,11 @@ class SoftwareSpec
end
def download_strategy
@download_strategy ||= DownloadStrategyDetector.detect(@url, @using)
@download_strategy ||= DownloadStrategyDetector.detect(url, using)
end
def verify_download_integrity fn
fn.verify_checksum @checksum
fn.verify_checksum(checksum)
rescue ChecksumMissingError
opoo "Cannot verify package integrity"
puts "The formula did not provide a download checksum"
@ -61,7 +61,7 @@ class SoftwareSpec
end
def mirror val
@mirrors << val
mirrors << val
end
end