Module: See::Config

Defined in:
lib/see/config.rb

Class Method Summary collapse

Class Method Details

.loadObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/see/config.rb', line 5

def self.load
  config_path = "#{Dir.pwd}/see.yml"
  begin
    config = YAML.load_file(config_path)
  rescue => error
    puts "No configuration file found (tried #{config_path})".yellow
    puts '  (if the file exists it may be malformed)'
    puts "  #{error}".light_red
    exit 1
  end
  config
end