Sha256: 76e8ce18c03856e43ce780fe90f87852356464af33d05273672c334a369f547c

Contents?: true

Size: 729 Bytes

Versions: 9

Compression:

Stored size: 729 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]
        option_choice = opts[:option_choice]

        terminal_win.key_press_event.key_r = false
        Cryptum.read_bot_conf(option_choice: option_choice)
      rescue StandardError => e
        raise e
      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.271 lib/cryptum/event/bot_conf.rb
cryptum-0.0.270 lib/cryptum/event/bot_conf.rb
cryptum-0.0.269 lib/cryptum/event/bot_conf.rb
cryptum-0.0.268 lib/cryptum/event/bot_conf.rb
cryptum-0.0.267 lib/cryptum/event/bot_conf.rb
cryptum-0.0.266 lib/cryptum/event/bot_conf.rb
cryptum-0.0.265 lib/cryptum/event/bot_conf.rb
cryptum-0.0.264 lib/cryptum/event/bot_conf.rb
cryptum-0.0.263 lib/cryptum/event/bot_conf.rb