Module: Qu

Extended by:
Qu, SingleForwardable
Included in:
Qu
Defined in:
lib/qu.rb,
lib/qu/logger.rb,
lib/qu/worker.rb,
lib/qu/failure.rb,
lib/qu/payload.rb,
lib/qu/version.rb,
lib/qu/backend/base.rb,
lib/qu/backend/immediate.rb

Defined Under Namespace

Modules: Backend, Failure, Logger Classes: Payload, Worker

Constant Summary collapse

VERSION =
"0.2.0"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



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

def backend
  @backend
end

#failureObject

Returns the value of attribute failure.



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

def failure
  @failure
end

#loggerObject

Returns the value of attribute logger.



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

def logger
  @logger
end

Instance Method Details

#configure(&block) ⇒ Object



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

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

#enqueue(klass, *args) ⇒ Object



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

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