Class: Pandemonium::Repos

Inherits:
Object
  • Object
show all
Defined in:
lib/pandemonium/repos.rb

Instance Method Summary collapse

Constructor Details

#initializeRepos

Returns a new instance of Repos.



5
6
7
# File 'lib/pandemonium/repos.rb', line 5

def initialize
  @repos = []
end

Instance Method Details

#<<(repo) ⇒ Object



13
14
15
# File 'lib/pandemonium/repos.rb', line 13

def <<(repo)
  @repos << repo
end

#[](name) ⇒ Object



9
10
11
# File 'lib/pandemonium/repos.rb', line 9

def [](name)
  @repos.select { |item| item.name == name }.first
end

#load(array) ⇒ Object



17
18
19
20
21
# File 'lib/pandemonium/repos.rb', line 17

def load(array)
  Array(array).each do |name, repo|
    @repos << Repo.new(name, repo["repository"], repo["deploy_script"])
  end
end