class GlobalRegistry::Bindings::Worker
Attributes
model[RW]
Public Class Methods
new(model = nil)
click to toggle source
# File lib/global_registry_bindings/worker.rb, line 15 def initialize(model = nil) self.model = model end
perform_async(*args)
click to toggle source
# File lib/global_registry_bindings/testing.rb, line 49 def perform_async(*args) return if GlobalRegistry::Bindings::Testing.skip? perform_async_real(*args) end
Also aliased as: perform_async_real
Public Instance Methods
perform(model_class, id)
click to toggle source
# File lib/global_registry_bindings/worker.rb, line 19 def perform(model_class, id) klass = model_class.is_a?(String) ? model_class.constantize : model_class self.model = klass.find(id) end