Method: Isaac::Bot#on

Defined in:
lib/isaac/bot.rb

#on(event, match = //, &block) ⇒ Object



23
24
25
26
# File 'lib/isaac/bot.rb', line 23

def on(event, match=//, &block)
  match = match.to_s if match.is_a? Integer
  (@events[event] ||= []) << [Regexp.new(match), block]
end