Sha256: 95fd50c7a760f9df4de792c921884ac9f7f1625aa415b7e9ec7aa7227c438134

Contents?: true

Size: 981 Bytes

Versions: 9

Compression:

Stored size: 981 Bytes

Contents

# frozen_string_literal: true

module Cryptum
  # This plugin is used to Reload the Bot Conf When the "r" Key is Pressed
  module Event
    module BotConf
      # Supported Method Parameters::
      # Cryptum::Event::BotConf.reload(
      # )
      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

      # Display Usage for this Module
      public_class_method def self.help
        puts "USAGE:
         bot_conf = #{self}.reload()
        "
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cryptum-0.0.397 lib/cryptum/event/bot_conf.rb
cryptum-0.0.396 lib/cryptum/event/bot_conf.rb
cryptum-0.0.395 lib/cryptum/event/bot_conf.rb
cryptum-0.0.394 lib/cryptum/event/bot_conf.rb
cryptum-0.0.393 lib/cryptum/event/bot_conf.rb
cryptum-0.0.392 lib/cryptum/event/bot_conf.rb
cryptum-0.0.389 lib/cryptum/event/bot_conf.rb
cryptum-0.0.388 lib/cryptum/event/bot_conf.rb
cryptum-0.0.387 lib/cryptum/event/bot_conf.rb