Sha256: fcb0a263d16995c0065d57611dea5743dc9ed594a0e40fe3c9058ffe1d86b182

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

module AsciiBinderGabrielRH
  class SiteInfo
    attr_reader :id, :name, :url, :distros, :branches

    def initialize(distro)
      @id       = distro.site.id
      @name     = distro.site.name
      @url      = distro.site.url
      @distros  = {}
      @branches = ['main']
      add_distro(distro)
    end

    def add_distro(distro)
      @distros[distro.id] = distro.branches
      distro.branches.each do |branch|
        next if @branches.include?(branch.id)
        @branches << branch.id
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ascii_binder_gabriel_rh-0.0.1 lib/ascii_binder_gabriel_rh/site_info.rb