Sha256: dc9029664adde47e1c6605c8c4e65aad95c9916d968d98fda6822663e695194b

Contents?: true

Size: 549 Bytes

Versions: 1

Compression:

Stored size: 549 Bytes

Contents

require "tennis/action"
require "tennis/worker"

module Tennis
  module Job
    def self.included(base)
      base.extend(ClassMethods)
    end

    # Return a proxy object that will enqueue method calls into
    # the Tennis's backend.
    def async
      Action.new(self)
    end

    # Dump a Job instance into a simple hash.
    def job_dump
      raise NotImplementedError
    end

    module ClassMethods

      # Build a Job instance from a simple hash.
      def job_load(hash)
        raise NotImplementedError
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tennis-jobs-0.4.0 lib/tennis/job.rb