Module: Telegram::BotManager::BotClassMethods::ClassMethods

Defined in:
lib/telegram/bot_manager/bot_class_methods.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#localizerObject



31
32
33
# File 'lib/telegram/bot_manager/bot_class_methods.rb', line 31

def localizer
  @localizer ||= configuration.localizer
end

#loggerObject



35
36
37
# File 'lib/telegram/bot_manager/bot_class_methods.rb', line 35

def logger
  @logger ||= configuration.logger
end

Instance Method Details

#app_nameObject



23
24
25
# File 'lib/telegram/bot_manager/bot_class_methods.rb', line 23

def app_name
  @app_name ||= configuration.app_name
end

#botObject



39
40
41
# File 'lib/telegram/bot_manager/bot_class_methods.rb', line 39

def bot
  @bot ||= configuration.bot
end

#configurationObject



15
16
17
# File 'lib/telegram/bot_manager/bot_class_methods.rb', line 15

def configuration
  @configuration ||= BotConfiguration.new
end

#configure {|configuration| ... } ⇒ Object

Yields:



19
20
21
# File 'lib/telegram/bot_manager/bot_class_methods.rb', line 19

def configure
  yield(configuration)
end

#localeObject



27
28
29
# File 'lib/telegram/bot_manager/bot_class_methods.rb', line 27

def locale
  @locale ||= configuration.locale
end