Method: WeChat::Bot::Handler#initialize
- Defined in:
- lib/wechat/bot/handler.rb
#initialize(bot, event, pattern, options = {}, &block) ⇒ Handler
Returns a new instance of Handler.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/wechat/bot/handler.rb', line 26 def initialize(bot, event, pattern, = {}, &block) = { :group => nil, :execute_in_callback => false, :strip_colors => false, :args => [] }.merge() @bot = bot @event = event @pattern = pattern @block = block @group = [:group] @execute_in_callback = [:execute_in_callback] @args = [:args] @thread_group = ThreadGroup.new end |