module TelegramWorkflow

Constants

VERSION

Public Class Methods

__after_configuration(&block) click to toggle source
# File lib/telegram_workflow/config.rb, line 18
def __after_configuration(&block)
  @__after_configuration = block
end
config() click to toggle source
# File lib/telegram_workflow/config.rb, line 7
def config
  @config ||= Configuration.new
end
configure() { |config| ... } click to toggle source
# File lib/telegram_workflow/config.rb, line 11
def configure
  yield(config)
  config.verify!

  @__after_configuration.call(config)
end
process(params) click to toggle source
# File lib/telegram_workflow.rb, line 8
def self.process(params)
  Workflow.new(params).process
end
stop_updates() click to toggle source
# File lib/telegram_workflow.rb, line 22
def self.stop_updates
  @updates && @updates.stop = true
end
updates(offset: nil, limit: nil, timeout: 60, allowed_updates: nil) click to toggle source
# File lib/telegram_workflow.rb, line 12
def self.updates(offset: nil, limit: nil, timeout: 60, allowed_updates: nil)
  params = {}
  params[:offset] = offset if offset
  params[:limit] = limit if limit
  params[:timeout] = timeout if timeout
  params[:allowed_updates] = allowed_updates if allowed_updates

  (@updates = Updates.new(params)).enum
end