class Apt::Spy2::Url
build mirror url
Public Class Methods
new(strict)
click to toggle source
# File lib/apt/spy2/url.rb, line 7 def initialize(strict) @strict = strict end
Public Instance Methods
adjust!(mirror)
click to toggle source
# File lib/apt/spy2/url.rb, line 11 def adjust!(mirror) return mirror unless @strict "#{mirror}dists/#{release}/Contents-#{arch}.gz" end
Private Instance Methods
arch()
click to toggle source
# File lib/apt/spy2/url.rb, line 19 def arch `dpkg --print-architecture`.strip end
release()
click to toggle source
# File lib/apt/spy2/url.rb, line 23 def release `lsb_release -c`.split(' ')[1].strip end