lib/advanced_sneakers_activejob.rb in advanced-sneakers-activejob-0.3.1 vs lib/advanced_sneakers_activejob.rb in advanced-sneakers-activejob-0.3.2
- old
+ new
@@ -66,7 +66,13 @@
# Ruby does not allow classes with leading digits
parameterized_string.gsub!(/\A(\d)/, 'queue\1')
[parameterized_string, 'consumer'].join('_').classify
end
+
+ def const_missing(name)
+ Sneakers::Worker::Classes.define_active_job_consumers
+
+ constants.include?(name) ? const_get(name) : super
+ end
end
end