Class: Telegram::BotManager::Application
- Inherits:
-
Object
- Object
- Telegram::BotManager::Application
- Defined in:
- lib/telegram/bot_manager/application.rb
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize(configuration) ⇒ Application
constructor
A new instance of Application.
- #run ⇒ Object
Constructor Details
#initialize(configuration) ⇒ Application
Returns a new instance of Application.
7 8 9 10 11 12 13 |
# File 'lib/telegram/bot_manager/application.rb', line 7 def initialize(configuration) @configuration = configuration @bot = @configuration.bot configure if BotManager.configuration. end |
Instance Method Details
#configure ⇒ Object
15 16 17 18 |
# File 'lib/telegram/bot_manager/application.rb', line 15 def configure rescue => exception handle_exception(exception) end |
#run ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/telegram/bot_manager/application.rb', line 20 def run Telegram::Bot::UpdatesPoller.start( @bot, controller ) rescue => exception handle_exception(exception) end |