Module: Mobistar
- Defined in:
- lib/mobistar.rb,
lib/mobistar/config.rb
Defined Under Namespace
Classes: AuthenticationError, Client, CookieError, InvalidGSMNumber, MissingLink, NotLoggedIn, Number
Constant Summary collapse
- ConfigFile =
File.join(ENV['HOME'], '.mobistar.yml')
- Config =
{}
Class Method Summary collapse
Class Method Details
.load_config! ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mobistar/config.rb', line 7 def self.load_config! if File.exists? ConfigFile Config.merge! YAML.load_file(ConfigFile) end at_exit do File.open(ConfigFile, 'w') do |f| f.puts YAML.dump(Config) end end end |