class Ant::Bot::CommandDefinition
Wraps a collection of commands.
Public Class Methods
new()
click to toggle source
# File lib/ant/bot/command_definition.rb, line 35 def initialize @commands = {} end
Public Instance Methods
[](name)
click to toggle source
Returns a command with the name
# File lib/ant/bot/command_definition.rb, line 45 def [](name) @commands[name] end
register_command(name, params, block)
click to toggle source
Stores an operation definition
# File lib/ant/bot/command_definition.rb, line 40 def register_command(name, params, block) @commands[name] = Command.new(params, block) end