class TelegramMeetupBot::Initializers::ConfigLoader
Constants
- AVAILABLE_KEYS
- EMPTY
- FILE_NAME
Public Class Methods
bot_name()
click to toggle source
# File lib/telegram_meetup_bot/initializers/config_loader.rb, line 18 def bot_name @configurations['bot_name'] end
botan_key()
click to toggle source
# File lib/telegram_meetup_bot/initializers/config_loader.rb, line 22 def botan_key @key ||= if @configurations['botan_key'] == EMPTY nil else @configurations['botan_key'] end end
storage()
click to toggle source
# File lib/telegram_meetup_bot/initializers/config_loader.rb, line 10 def storage @storage ||= Storage.new(redis: redis, redis_key: redis_key) end
token()
click to toggle source
# File lib/telegram_meetup_bot/initializers/config_loader.rb, line 14 def token @configurations['bot_token'] end
Private Class Methods
redis()
click to toggle source
# File lib/telegram_meetup_bot/initializers/config_loader.rb, line 36 def redis @redis ||= Redis.new( host: @configurations['redis_host'], port: @configurations['redis_port'] ) end
redis_key()
click to toggle source
# File lib/telegram_meetup_bot/initializers/config_loader.rb, line 32 def redis_key @configurations['redis_key'] end