Module: MicroQ::Methods::Instance

Defined in:
lib/micro_q/methods/instance.rb

Overview

Methods that are added to all Ruby Objects (as instance methods).

When processing instance methods asynchronously, simply store the calling instances’ class name. No custom ‘loader’ is needed but since the worker defines a default ‘loader’. An example loader for a messages invoked as MyWorker.new.perform(123), is :loader => { :method => ‘new’, :args => []} which happens to be what the default worker does.

Instance Method Summary collapse

Instance Method Details

#async(options = {}) ⇒ Object



14
15
16
17
18
# File 'lib/micro_q/methods/instance.rb', line 14

def async(options = {})
  MicroQ::Proxy::Instance.new(
    options.merge(:class => self.class)
  )
end