Sha256: 8deba66cb59e91e55685deeace57570d22f236d40675db586fd2a699786a2680

Contents?: true

Size: 434 Bytes

Versions: 34

Compression:

Stored size: 434 Bytes

Contents

module Telegram
  module Bot
    module DebugClient
      def debug!(dev = STDOUT)
        if block_given?
          begin
            old_dev = client.debug_dev
            client.debug_dev = dev
            yield
          ensure
            client.debug_dev = old_dev
          end
        else
          client.debug_dev = dev
        end
      end

      def debug_off!
        client.debug_dev = nil
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
telegram-bot-0.16.1 lib/telegram/bot/debug_client.rb
telegram-bot-0.16.0 lib/telegram/bot/debug_client.rb
telegram-bot-0.15.7 lib/telegram/bot/debug_client.rb
telegram-bot-0.15.6 lib/telegram/bot/debug_client.rb
telegram-bot-0.15.4 lib/telegram/bot/debug_client.rb
telegram-bot-0.15.3 lib/telegram/bot/debug_client.rb
telegram-bot-0.15.2 lib/telegram/bot/debug_client.rb
telegram-bot-0.15.1 lib/telegram/bot/debug_client.rb
telegram-bot-0.15.0 lib/telegram/bot/debug_client.rb
telegram-bot-0.14.4 lib/telegram/bot/debug_client.rb
telegram-bot-0.14.3 lib/telegram/bot/debug_client.rb
telegram-bot-0.14.2 lib/telegram/bot/debug_client.rb
telegram-bot-0.14.1 lib/telegram/bot/debug_client.rb
telegram-bot-0.14.0 lib/telegram/bot/debug_client.rb
telegram-bot-0.13.1 lib/telegram/bot/debug_client.rb
telegram-bot-0.13.0 lib/telegram/bot/debug_client.rb
telegram-bot-0.12.4 lib/telegram/bot/debug_client.rb
telegram-bot-0.12.3 lib/telegram/bot/debug_client.rb
telegram-bot-0.12.1 lib/telegram/bot/debug_client.rb
telegram-bot-0.12.0 lib/telegram/bot/debug_client.rb