class Kybus::Bot::CommandDefinition

Wraps a collection of commands.

Public Class Methods

new() click to toggle source
# File lib/kybus/bot/command_definition.rb, line 30
def initialize
  @commands = {}
end

Public Instance Methods

[](name) click to toggle source

Returns a command with the name

# File lib/kybus/bot/command_definition.rb, line 40
def [](name)
  @commands[name]
end
register_command(name, params, block) click to toggle source

Stores an operation definition

# File lib/kybus/bot/command_definition.rb, line 35
def register_command(name, params, block)
  @commands[name] = Command.new(params, block)
end