Method: Cinch::Helpers#Timer
- Defined in:
- lib/cinch/helpers.rb
#Timer(interval, options = {}, &block) ⇒ Timer
93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/cinch/helpers.rb', line 93 def Timer(interval, = {}, &block) = {:method => :timer, :threaded => true, :interval => interval}.merge() block ||= self.method([:method]) timer = Cinch::Timer.new(bot, , &block) timer.start if self.respond_to?(:timers) timers << timer end timer end |