module Telegram::Bot::UpdatesController::Testing
Constants
- IVARS_TO_KEEP
Public Instance Methods
dispatch_again(bot = nil, update = nil)
click to toggle source
Perform multiple dispatches on same instance.
# File lib/telegram/bot/updates_controller/testing.rb, line 8 def dispatch_again(bot = nil, update = nil) recycle! initialize(bot, update) dispatch end
recycle!(full = false)
click to toggle source
Cleans controller between dispatches. Seems like there is nothing to clean between requests for now: everything will be rewriten with initialize.
With `full` set to `true` it'll clear all cached instance variables.
# File lib/telegram/bot/updates_controller/testing.rb, line 19 def recycle!(full = false) return unless full (instance_variables - IVARS_TO_KEEP).each do |ivar| remove_instance_variable(ivar) end end
Protected Instance Methods
session()
click to toggle source
Stubs session.
# File lib/telegram/bot/updates_controller/testing.rb, line 29 def session @_session ||= Session::NullSessionHash.new end