Class: Ant::Bot::CommandDefinition
- Inherits:
-
Object
- Object
- Ant::Bot::CommandDefinition
- Defined in:
- lib/ant/bot/command_definition.rb
Overview
Wraps a collection of commands.
Instance Method Summary collapse
-
#[](name) ⇒ Object
Returns a command with the name.
-
#initialize ⇒ CommandDefinition
constructor
A new instance of CommandDefinition.
-
#register_command(name, params, block) ⇒ Object
Stores an operation definition.
Constructor Details
#initialize ⇒ CommandDefinition
Returns a new instance of CommandDefinition.
35 36 37 |
# File 'lib/ant/bot/command_definition.rb', line 35 def initialize @commands = {} end |
Instance Method Details
#[](name) ⇒ Object
Returns a command with the name
45 46 47 |
# File 'lib/ant/bot/command_definition.rb', line 45 def [](name) @commands[name] end |