Class: BitexBot::SettingsClass
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- BitexBot::SettingsClass
- Includes:
- Hashie::Extensions::Mash::SymbolizeKeys
- Defined in:
- lib/bitex_bot/settings.rb
Overview
This class load settings file, else write a sample file.
Instance Method Summary collapse
- #base ⇒ Object
- #buying_fx_rate ⇒ Object
- #load_default ⇒ Object
- #load_test ⇒ Object
- #maker_class ⇒ Object
- #maker_settings ⇒ Object
- #quote ⇒ Object
- #selling_fx_rate ⇒ Object
- #taker_class ⇒ Object
- #taker_settings ⇒ Object
Instance Method Details
#base ⇒ Object
42 43 44 |
# File 'lib/bitex_bot/settings.rb', line 42 def base order_book_currencies[:base] end |
#buying_fx_rate ⇒ Object
34 35 36 |
# File 'lib/bitex_bot/settings.rb', line 34 def Store.first.try(:buying_fx_rate) || end |
#load_default ⇒ Object
28 29 30 31 32 |
# File 'lib/bitex_bot/settings.rb', line 28 def load_default path = ARGV[0] || 'bitex_bot_settings.rb' show_sample(path) unless FileTest.exists?(path) load_settings(path) end |
#load_test ⇒ Object
24 25 26 |
# File 'lib/bitex_bot/settings.rb', line 24 def load_test load_settings(sample_path) end |
#maker_class ⇒ Object
50 51 52 |
# File 'lib/bitex_bot/settings.rb', line 50 def maker_class exchange_class(maker) end |
#maker_settings ⇒ Object
58 59 60 |
# File 'lib/bitex_bot/settings.rb', line 58 def maker_settings exchange_settings(maker) end |
#quote ⇒ Object
46 47 48 |
# File 'lib/bitex_bot/settings.rb', line 46 def quote order_book_currencies[:quote] end |
#selling_fx_rate ⇒ Object
38 39 40 |
# File 'lib/bitex_bot/settings.rb', line 38 def selling_fx_rate Store.first.try(:selling_fx_rate) || selling_foreign_exchange_rate end |
#taker_class ⇒ Object
54 55 56 |
# File 'lib/bitex_bot/settings.rb', line 54 def taker_class exchange_class(taker) end |
#taker_settings ⇒ Object
62 63 64 |
# File 'lib/bitex_bot/settings.rb', line 62 def taker_settings exchange_settings(taker) end |