class RightPublish::RepoManager

Public Class Methods

get_repository(type) click to toggle source
# File lib/right_publish/repo.rb, line 11
def self.get_repository(type)
  @@repository_table[type].new(type) if @@repository_table[type]
end
register_repo(repo_type) click to toggle source
# File lib/right_publish/repo.rb, line 21
def self.register_repo(repo_type)
  repo_key = repo_type::REPO_KEY

  if repo_type.respond_to?(:new) && @@repository_type_regex.match(repo_key.to_s)
    @@repository_table[repo_key] = repo_type
    RightPublish::Profile.instance.register_section(repo_key, repo_type::REPO_OPTIONS)
  else
    raise TypeError
  end

  nil
end
repo_types() click to toggle source
# File lib/right_publish/repo.rb, line 15
def self.repo_types()
  type_hash = {}
  @@repository_table.each_key { |k| type_hash[@@repository_type_regex.match(k.to_s)[1]] = k }
  type_hash
end