Module: Cinch::Commands::ClassMethods
- Defined in:
- lib/cinch/commands/commands.rb
Instance Method Summary collapse
-
#command(name, arguments = {}, options = {}) ⇒ Command
protected
Registers a command.
-
#commands ⇒ Array<Command>
All registered commands.
Instance Method Details
#command(name, arguments = {}, options = {}) ⇒ Command (protected)
Registers a command.
55 56 57 58 59 60 61 62 |
# File 'lib/cinch/commands/commands.rb', line 55 def command(name,arguments={},={}) new_command = Command.new(name,arguments,) match(new_command.regexp, method: name) commands << new_command return new_command end |
#commands ⇒ Array<Command>
All registered commands.
23 24 25 |
# File 'lib/cinch/commands/commands.rb', line 23 def commands @commands ||= [] end |