Sha256: 144d2d62de45bfe3a2103818c2d1d6fcdd3672e316c859a987d84af9875fb85b

Contents?: true

Size: 495 Bytes

Versions: 16

Compression:

Stored size: 495 Bytes

Contents

require 'ascii_binder/site_info'

module AsciiBinder
  class SiteMap
    def initialize(distro_map)
      @site_map = {}
      distro_map.distros.each do |distro|
        unless @site_map.has_key?(distro.site.id)
          @site_map[distro.site.id] = AsciiBinder::SiteInfo.new(distro)
        else
          @site_map[distro.site.id].add_distro(distro)
        end
      end
    end

    def sites
      return @site_map.values
    end

    def ids
      return @site_map.keys
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ascii_binder-1.2 lib/ascii_binder/site_map.rb
ascii_binder-1.0.1 lib/ascii_binder/site_map.rb
ascii_binder-1.0 lib/ascii_binder/site_map.rb
ascii_binder-0.2.3 lib/ascii_binder/site_map.rb
ascii_binder-0.2.2 lib/ascii_binder/site_map.rb
ascii_binder-0.2.1 lib/ascii_binder/site_map.rb
ascii_binder-0.2.0 lib/ascii_binder/site_map.rb
ascii_binder-0.1.15.3 lib/ascii_binder/site_map.rb
ascii_binder-0.1.15.2 lib/ascii_binder/site_map.rb
ascii_binder-0.1.15.1 lib/ascii_binder/site_map.rb
ascii_binder-0.1.15 lib/ascii_binder/site_map.rb
ascii_binder-0.1.14 lib/ascii_binder/site_map.rb
ascii_binder-0.1.13 lib/ascii_binder/site_map.rb
ascii_binder-0.1.11 lib/ascii_binder/site_map.rb
ascii_binder-0.1.10.1 lib/ascii_binder/site_map.rb
ascii_binder-0.1.10 lib/ascii_binder/site_map.rb