Sha256: cd33ef0cd3c4a7d99642637fb2fa18b1e9b54de4c67454ae031519f7356655b8

Contents?: true

Size: 485 Bytes

Versions: 5

Compression:

Stored size: 485 Bytes

Contents

require "redis"
require "redis-namespace"

require_relative "rector/configuration"
require_relative "rector/worker"
require_relative "rector/job"
require_relative "rector/backends"

module Rector
  class << self
    def configuration
      @configuration ||= Rector::Configuration.new
    end

    def reset
      @configuration = nil
    end

    def configure
      yield configuration
    end

    def backend_for(job_id)
      Rector::Backends::Redis.new(job_id)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rector-0.0.5 lib/rector.rb
rector-0.0.4 lib/rector.rb
rector-0.0.3 lib/rector.rb
rector-0.0.2 lib/rector.rb
rector-0.0.1 lib/rector.rb