Module: RCelery::TaskSupport
- Defined in:
- lib/rcelery/task_support.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 |
# File 'lib/rcelery/task_support.rb', line 3 def self.included(base) base.extend(ClassMethods) end |
.task_name(mod, method) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/rcelery/task_support.rb', line 7 def self.task_name(mod, method) parts = mod.split('::') << method.to_s klass_name = parts.map do |part| part.gsub(/([^\a])([A-Z])/) { "#{$1}_#{$2}" }.downcase end.join('.') end |