Module: Qu

Extended by:
Qu, SingleForwardable
Included in:
Qu
Defined in:
ext/qu.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



16
17
18
# File 'ext/qu.rb', line 16

def backend
  @backend
end

#failureObject

Returns the value of attribute failure.



16
17
18
# File 'ext/qu.rb', line 16

def failure
  @failure
end

#loggerObject

Returns the value of attribute logger.



16
17
18
# File 'ext/qu.rb', line 16

def logger
  @logger
end

Instance Method Details

#configure(&block) ⇒ Object



24
25
26
# File 'ext/qu.rb', line 24

def configure(&block)
  block.call(self)
end

#enqueue(klass, *args) ⇒ Object



28
29
30
# File 'ext/qu.rb', line 28

def enqueue(klass, *args)
  backend.enqueue Payload.new(:klass => klass, :args => args)
end