Class: RankMirror::LocalPackman

Inherits:
Object
  • Object
show all
Defined in:
lib/rankmirror/distro/local/packman.rb

Instance Method Summary collapse

Constructor Details

#initialize(mirrorlist, options) ⇒ LocalPackman

Returns a new instance of LocalPackman.



3
4
5
6
# File 'lib/rankmirror/distro/local/packman.rb', line 3

def initialize(mirrorlist,options)
	@options = options
	@mirrorlist = RankMirror::Config.new(@options).parse(mirrorlist,@options.keys)
end

Instance Method Details

#sortObject



8
9
10
11
12
13
# File 'lib/rankmirror/distro/local/packman.rb', line 8

def sort
	sorted = @mirrorlist.map!{|m|
			m.http if @options.continent == m.continent && m[@options.flavor] == "true"
	}.compact!
	return sorted
end