Sha256: 60d1cb1b7eebf7fbdfa807c0e447ce85c423cfeeafdcf6c91dd74f92ea8a3bd9

Contents?: true

Size: 402 Bytes

Versions: 34

Compression:

Stored size: 402 Bytes

Contents

module Telegram
  module Bot
    class UpdatesController
      # Include this module to type cast update to Virtus model
      # using `telegram-bot-types` gem (install this gem first).
      module TypedUpdate
        def initialize(bot = nil, update = nil)
          update = Types::Update.new(update) if update && !update.is_a?(Types::Update)
          super
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
telegram-bot-0.15.7 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.15.6 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.15.4 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.15.3 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.15.2 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.15.1 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.15.0 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.14.4 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.14.3 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.14.2 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.14.1 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.14.0 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.13.1 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.13.0 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.12.4 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.12.3 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.12.1 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.12.0 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.11.3 lib/telegram/bot/updates_controller/typed_update.rb
telegram-bot-0.11.2 lib/telegram/bot/updates_controller/typed_update.rb