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

Avoid Hash#transform_values. Fixes #63

Этот коммит содержится в:
Max Melentiev
2018-02-21 19:49:09 +03:00
родитель c86b2ef09b
Коммит 9af6de8d36
2 изменённых файлов: 2 добавлений и 3 удалений

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

@@ -1,5 +1,4 @@
require 'active_support/core_ext/hash/keys'
require 'active_support/core_ext/hash/transform_values'
require 'active_support/core_ext/hash/indifferent_access'
module Telegram
@@ -43,7 +42,7 @@ module Telegram
# Hash of botan clients made from #bots.
def botans
@botans ||= bots.transform_values(&:botan)
@botans ||= bots.map { |k, v| [k, v.botan] }.to_h
end
# Returns config for .bots method. By default uses `telegram['bots']` section