Sha256: d782b6031351eea27eeba4330c92730e23efae2adae38e12cd766c7774e039c8

Contents?: true

Size: 244 Bytes

Versions: 5

Compression:

Stored size: 244 Bytes

Contents

module Sideband
  class Worker

    def call
      raise NotImplementedError.new('Define your Work in a Worker subclass.')
    end
    
    def enqueue
      Sideband.queue << self
      true
    end
    alias_method :queue, :enqueue
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sideband-1.0.4 lib/sideband/worker.rb
sideband-1.0.3 lib/sideband/worker.rb
sideband-1.0.2 lib/sideband/worker.rb
sideband-1.0.1 lib/sideband/worker.rb
sideband-1.0.0 lib/sideband/worker.rb