Module: Pandemonium::Loader

Included in:
ConfigLoader
Defined in:
lib/pandemonium/loader.rb

Constant Summary collapse

REPO_FILE =
File.expand_path("~/.pandemonium").freeze

Instance Method Summary collapse

Instance Method Details

#initialize(config) ⇒ Object



7
8
9
# File 'lib/pandemonium/loader.rb', line 7

def initialize(config)
  @config = config
end

#load_reposObject Also known as: file_modified



11
12
13
14
15
16
17
# File 'lib/pandemonium/loader.rb', line 11

def load_repos
  puts "reloading repos"
  repos = TOML.load_file(REPO_FILE)

  @config["repos"] = Pandemonium::Repos.new
  @config["repos"].load(repos)
end