module Comandor::ClassMethods
ClassName.perform
Public Instance Methods
inherited(child)
click to toggle source
Callback when inherited from Comandor
class
# File lib/comandor.rb, line 18 def inherited(child) child.prepend(Comandor) child.extend(ClassMethods) end
perform(*args, &block)
click to toggle source
# File lib/comandor.rb, line 23 def perform(*args, &block) new.perform(*args, &block) end
transaction!(name)
click to toggle source
Add transaction layer @param [name] [String] ActiveRecord::Base.transaction
# File lib/comandor.rb, line 29 def transaction!(name) class_eval { @transaction_klass, @transaction_method = name.split('.') } end
transaction_klass()
click to toggle source
Class variables accessor
# File lib/comandor.rb, line 34 def transaction_klass @transaction_klass end
transaction_method()
click to toggle source
# File lib/comandor.rb, line 38 def transaction_method @transaction_method end