Class: IRC::Callback

Inherits:
Object
  • Object
show all
Defined in:
lib/on_irc/callback.rb

Defined Under Namespace

Classes: CallbackDSL

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ Callback

Returns a new instance of Callback.



3
4
5
# File 'lib/on_irc/callback.rb', line 3

def initialize(block)
  @block = block
end

Instance Method Details

#call(irc, event) ⇒ Object



7
8
9
# File 'lib/on_irc/callback.rb', line 7

def call(irc, event)
  CallbackDSL.run(irc, event, @block)
end