Module: Cryptum::Event::BotConf
- Defined in:
- lib/cryptum/event/bot_conf.rb
Overview
This Module is used to Reload the Bot Conf When the “r” Key is Pressed
Class Method Summary collapse
-
.help ⇒ Object
Display Usage for this Module.
-
.reload(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::BotConf.reload( ).
Class Method Details
.help ⇒ Object
Display Usage for this Module
28 29 30 31 32 |
# File 'lib/cryptum/event/bot_conf.rb', line 28 public_class_method def self.help puts "USAGE: bot_conf = #{self}.reload() " end |
.reload(opts = {}) ⇒ Object
- Supported Method Parameters
-
Cryptum::Event::BotConf.reload( )
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cryptum/event/bot_conf.rb', line 11 public_class_method def self.reload(opts = {}) terminal_win = opts[:terminal_win] event_history = opts[:event_history] option_choice = opts[:option_choice] event_history.recalculate_order_plan = true terminal_win.key_press_event.key_r = false Cryptum::BotConf.read( option_choice: option_choice, event_history: event_history ) rescue Interrupt, StandardError => e Cryptum::Log.append(level: :error, msg: e, which_self: self, event_history: event_history) end |