Class: TelegramMeetupBot::Initializers::ConfigLoader
- Inherits:
-
Base
- Object
- Base
- TelegramMeetupBot::Initializers::ConfigLoader
show all
- Defined in:
- lib/telegram_meetup_bot/initializers/config_loader.rb
Constant Summary
collapse
- FILE_NAME =
'config.yml'
- AVAILABLE_KEYS =
%w(bot_token bot_name redis_key redis_port redis_host)
Class Method Summary
collapse
Methods inherited from Base
exit_if_file_not_exist, preload, validate
Class Method Details
.bot_name ⇒ Object
16
17
18
|
# File 'lib/telegram_meetup_bot/initializers/config_loader.rb', line 16
def bot_name
@configurations['bot_name']
end
|
.storage ⇒ Object
8
9
10
|
# File 'lib/telegram_meetup_bot/initializers/config_loader.rb', line 8
def storage
@storage ||= Storage.new(redis: redis, redis_key: redis_key)
end
|
.token ⇒ Object
12
13
14
|
# File 'lib/telegram_meetup_bot/initializers/config_loader.rb', line 12
def token
@configurations['bot_token']
end
|