Class: BitexBot::Settings

Inherits:
Settingslogic
  • Object
show all
Defined in:
lib/bitex_bot/settings.rb

Class Method Summary collapse

Class Method Details

.load_defaultObject



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

def self.load_default
  path = ARGV[0] || File.expand_path('bitex_bot_settings.yml', Dir.pwd)
  unless FileTest.exists?(path)
    sample_path = File.expand_path('../../../settings.yml.sample', __FILE__)
    FileUtils.cp(sample_path, path)
    puts "No settings found, I've created a new one with sample "\
      "values at #{path}. Please go ahead and edit it before running this again."
    exit 1
  end
  source path
end

.load_testObject



17
18
19
# File 'lib/bitex_bot/settings.rb', line 17

def self.load_test
  source File.expand_path('../../../settings.yml.sample', __FILE__)
end