Module: Telegram::Bot::UpdatesController::TypedUpdate

Defined in:
lib/telegram/bot/updates_controller/typed_update.rb

Overview

Include this module to type cast update to Virtus model using ‘telegram-bot-types` gem (install this gem first).

Instance Method Summary collapse

Instance Method Details

#initialize(bot = nil, update = nil, webhook_request = nil) ⇒ Object



9
10
11
12
# File 'lib/telegram/bot/updates_controller/typed_update.rb', line 9

def initialize(bot = nil, update = nil, webhook_request = nil)
  update = Types::Update.new(update) if update && !update.is_a?(Types::Update)
  super
end