Module: CommandHandler

Defined in:
lib/advanced_ruby_command_handler.rb,
lib/advanced_ruby_command_handler/app/utils.rb,
lib/advanced_ruby_command_handler/app/command.rb

Overview

Represent the CommandHandler as a simply class

Defined Under Namespace

Modules: Utils Classes: Command

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.new(commands_dir: "commands", events_dir: "events", config_file: "config.yml") ⇒ AdvancedRubyCommandHandler::Client

Returns the created client.

Parameters:

  • commands_dir (String) (defaults to: "commands")

    The command’s directory path

  • events_dir (String) (defaults to: "events")

    The event’s directory path

  • config_file (String) (defaults to: "config.yml")

    The config’s file path

Returns:



16
17
18
# File 'lib/advanced_ruby_command_handler.rb', line 16

def self.new(commands_dir: "commands", events_dir: "events", config_file: "config.yml")
  AdvancedRubyCommandHandler::Client.new(:commands_dir => commands_dir, :events_dir => events_dir, :config_file => config_file)
end

Instance Method Details

#newAdvancedRubyCommandHandler::Client

Returns the created client.

Parameters:

  • commands_dir (String)

    The command’s directory path

  • events_dir (String)

    The event’s directory path

  • config_file (String)

    The config’s file path

Returns:



16
17
18
# File 'lib/advanced_ruby_command_handler.rb', line 16

def self.new(commands_dir: "commands", events_dir: "events", config_file: "config.yml")
  AdvancedRubyCommandHandler::Client.new(:commands_dir => commands_dir, :events_dir => events_dir, :config_file => config_file)
end