Sha256: e502bc3d6fbe39c64ead694b9067ae7000e1cb87d5c5f9237ddb18427f9dfdc3

Contents?: true

Size: 498 Bytes

Versions: 7

Compression:

Stored size: 498 Bytes

Contents

module TireAsyncIndex
  class Configuration
    AVALAIBLE_ENGINE = [:sidekiq, :resque, :none]

    attr_accessor :queue
    attr_accessor :engine

    def background_engine type
      if AVALAIBLE_ENGINE.include?(type.to_sym)
        @engine = type.to_sym
      else
        raise EngineNotFound, "Background Engine '#{type}' not found"
      end
    end

    def use_queue name
      @queue = name.to_sym
    end

    def initialize
      @queue  = :normal
      @engine = :none
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tire_async_index-0.3.0 lib/tire_async_index/configuration.rb
tire_async_index-0.2.1 lib/tire_async_index/configuration.rb
tire_async_index-0.2.0 lib/tire_async_index/configuration.rb
tire_async_index-0.1.0 lib/tire_async_index/configuration.rb
tire_async_index-0.0.3 lib/tire_async_index/configuration.rb
tire_async_index-0.0.2 lib/tire_async_index/configuration.rb
tire_async_index-0.0.1 lib/tire_async_index/configuration.rb