Module: Telegram::Bot::Async::Job

Defined in:
lib/telegram/bot/async.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



44
45
46
# File 'lib/telegram/bot/async.rb', line 44

def included(base)
  base.singleton_class.send :attr_accessor, :client_class
end

Instance Method Details

#perform(client_id, *args) ⇒ Object



49
50
51
52
# File 'lib/telegram/bot/async.rb', line 49

def perform(client_id, *args)
  client = self.class.client_class.wrap(client_id.to_sym)
  client.async(false) { client.request(*args) }
end