Method: Cinch::Handler#initialize
- Defined in:
- lib/cinch/handler.rb
#initialize(bot, event, pattern, options = {}, &block) ⇒ Handler
Returns a new instance of Handler.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/cinch/handler.rb', line 41 def initialize(bot, event, pattern, = {}, &block) = { :group => nil, :execute_in_callback => false, :strip_colors => false, :args => [] }.merge() @bot = bot @event = event @pattern = pattern @group = [:group] @execute_in_callback = [:execute_in_callback] @strip_colors = [:strip_colors] @args = [:args] @block = block @thread_group = ThreadGroup.new end |