1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-06 11:05:51 +03:00

Fixed Readme, added spec for protected methods in controller

Этот коммит содержится в:
Max Melentiev
2016-03-14 14:20:16 +06:00
родитель c04884040d
Коммит 9fe4c6bcae
2 изменённых файлов: 35 добавлений и 19 удалений

Просмотреть файл

@@ -142,7 +142,7 @@ You can enable typecasting of `update` with `telegram-bot-types` by including
```ruby
class Telegram::WebhookController < Telegram::Bot::UpdatesController
include Telegram::Bot::UpdatesPoller::TypedUpdate
include Telegram::Bot::UpdatesController::TypedUpdate
def message(message)
message.class # => Telegram::Bot::Types::Message
@@ -205,7 +205,7 @@ class Telegram::WebhookController < Telegram::Bot::UpdatesController
# You can do it in other way:
def rename(name = nil, *)
if name
update_name message[:text]
update_name name
reply_with :message, text: 'Renamed!'
else
save_context :rename