Use ivar accessors
This commit is contained in:
parent
92d65aace7
commit
856cebd9b4
@ -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|
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user