class Chatterbot::Handler
class for holding onto a block/arguments we will use when calling methods on the Twitter API
Attributes
last_ran_at[R]
opts[R]
Public Class Methods
new(opts, &block)
click to toggle source
# File lib/chatterbot/handler.rb, line 11 def initialize(opts, &block) if block_given? @opts = *opts @block = block else @opts = nil @block = opts end end
Public Instance Methods
call(*args)
click to toggle source
call the block with the specified arguments
# File lib/chatterbot/handler.rb, line 24 def call(*args) @last_ran_at = Time.now @block.call(*args) end