Class: Totoro::Initializer
- Inherits:
-
Object
- Object
- Totoro::Initializer
- Defined in:
- lib/totoro/initializer.rb
Constant Summary collapse
- DEFAULT_CONFIG =
%i[default connect queue].freeze
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/totoro/initializer.rb', line 6 def execute config = Rails.application.config_for(:totoro).with_indifferent_access # set default queue class Totoro.const_set('Queue', default_queue_class(config)) # set custom queue class (config.symbolize_keys.keys - DEFAULT_CONFIG).each do |prefix| prefix_module(prefix, queue_class(prefix)) end end |