Class: Rubot::Core::Listener
Overview
Instance Method Summary collapse
-
#execute(server, message) ⇒ Object
Runs the listener with the given server and message.
-
#initialize(dispatcher) ⇒ Listener
constructor
Takes an instance of Rubot::Core::Dispatcher.
Constructor Details
#initialize(dispatcher) ⇒ Listener
Takes an instance of Rubot::Core::Dispatcher. Any child class that needs a constructor should override this method.
Parameters
- dispatcher<Rubot::Core::Dispatcher>
-
The dispatcher that was used to create
the instance of the listener.
21 22 23 |
# File 'lib/core/listener.rb', line 21 def initialize(dispatcher) @dispatcher = dispatcher end |
Instance Method Details
#execute(server, message) ⇒ Object
Runs the listener with the given server and message.
Paramters
- server<Rubot::Irc::Server>
-
Server instance the listener should use for
messaging and information.
- message<Rubot::Irc::Message>
-
The message that invoked the command.
31 32 33 |
# File 'lib/core/listener.rb', line 31 def execute(server, ) puts "#{self} listener does not implement execute method" end |