Sha256: f153b51f62c9cbba7b6f0d0825f5f5033b73fd9f22bd996b113cbf2778be0dca
Contents?: true
Size: 641 Bytes
Versions: 13
Compression:
Stored size: 641 Bytes
Contents
module Quebert module AsyncSender # I'm not sure if I want to do this or build serializers per type of object... module ActiveRecord class RecordJob < Job def perform(record, meth, *args) record.send(meth, *args) end end def self.included(base) base.send(:include, InstanceMethods) base.send(:include, AsyncSender::Object) end module InstanceMethods # The meat of dealing with ActiveRecord instances. def async_send(meth, *args) RecordJob.new(self, meth, *args).enqueue end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems