Class: Neverdone::Config
- Inherits:
-
Hash
- Object
- Hash
- Neverdone::Config
- Defined in:
- lib/neverdone.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.load ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/neverdone.rb', line 16 def self.load if File.exist?("#{ENV['HOME']}/.neverdone.conf") c = Config.new.merge YAML.load_file("#{ENV['HOME']}/.neverdone.conf") else c = Config.new end c[:user_store_url] = 'https://www.evernote.com/edam/user' if not c[:user_store_url] c end |
Instance Method Details
#save ⇒ Object
10 11 12 13 14 |
# File 'lib/neverdone.rb', line 10 def save File.open "#{ENV['HOME']}/.neverdone.conf", 'w' do |f| f.puts self.to_yaml end end |