Class: TelegramWebProxy
- Inherits:
-
Object
- Object
- TelegramWebProxy
- Defined in:
- lib/telegram_web_proxy.rb,
lib/telegram_web_proxy/version.rb
Defined Under Namespace
Classes: KeyboardGenerator, MessageProcessor, PageFetcher
Constant Summary collapse
- VERSION =
"0.1.0"
Instance Attribute Summary collapse
-
#bot ⇒ Object
Returns the value of attribute bot.
Instance Method Summary collapse
-
#initialize(bot) ⇒ TelegramWebProxy
constructor
A new instance of TelegramWebProxy.
- #message_processors ⇒ Object
- #process(message) ⇒ Object
Constructor Details
#initialize(bot) ⇒ TelegramWebProxy
Returns a new instance of TelegramWebProxy.
9 10 11 |
# File 'lib/telegram_web_proxy.rb', line 9 def initialize(bot) self.bot = bot end |
Instance Attribute Details
#bot ⇒ Object
Returns the value of attribute bot.
7 8 9 |
# File 'lib/telegram_web_proxy.rb', line 7 def bot @bot end |
Instance Method Details
#message_processors ⇒ Object
13 14 15 |
# File 'lib/telegram_web_proxy.rb', line 13 def @message_processors ||= {} end |
#process(message) ⇒ Object
17 18 19 20 21 |
# File 'lib/telegram_web_proxy.rb', line 17 def process() chat = get_chat() [chat.id] ||= MessageProcessor.new(bot, chat) [chat.id].process() end |