Class: Amnesie::Config
- Inherits:
-
Object
- Object
- Amnesie::Config
- Defined in:
- lib/amnesie/config.rb
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #load ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 8 |
# File 'lib/amnesie/config.rb', line 5 def initialize @file = File.join(find_conf) #puts "Config file in #{@file}" end |
Instance Method Details
#load ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/amnesie/config.rb', line 10 def load if !File.exist? @file puts "[+] Config file created at #{@file}" save end YAML.load_file @file end |