Class: Amnesie::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/amnesie/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

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

#loadObject



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