11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/mofa/config.rb', line 11
def self.load
unless Dir.exist?("#{ENV['HOME']}/.mofa")
warn "Mofa config folder not present! Please create a folder .mofa in your HOME directory: mkdir ~/.mofa"
end
unless File.exist?("#{ENV['HOME']}/.mofa/config.yml")
warn "Mofa config file not present at #{ENV['HOME']}/.mofa/config.yml! Please create a config file first! (see README.md)"
end
if File.exist?("#{ENV['HOME']}/.mofa/config.yml")
@@config = YAML.load(File.open("#{ENV['HOME']}/.mofa/config.yml"))
end
end
|