Class: Sponge::IRC::Listeners::Listener
- Inherits:
-
Object
- Object
- Sponge::IRC::Listeners::Listener
- Defined in:
- lib/sponge/irc/listeners.rb
Overview
Author
-
Lee Jarvis
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(command, &blk) ⇒ Listener
constructor
A new instance of Listener.
Constructor Details
#initialize(command, &blk) ⇒ Listener
Returns a new instance of Listener.
16 17 18 |
# File 'lib/sponge/irc/listeners.rb', line 16 def initialize(command, &blk) @callback = blk end |
Instance Method Details
#call(*args) ⇒ Object
20 21 22 |
# File 'lib/sponge/irc/listeners.rb', line 20 def call(*args) @callback.call(args) end |