Sha256: 252f2b3e74b088e7288a7b176b4524ef0747f8f3bb462fbdbb241ce5a800e837

Contents?: true

Size: 525 Bytes

Versions: 4

Compression:

Stored size: 525 Bytes

Contents

# frozen_string_literal: true

# rubocop:disable Style/ClassAndModuleChildren
begin
  require 'fakeredis'
rescue LoadError
  require 'redis'
end

module ActiveRedisDB
  class Configuration

    attr_accessor :client

    def initialize
      @client = ::Redis.new
    end

  end

  def self.configuration
    @configuration ||= Configuration.new
  end

  def self.configuration=(config)
    @configuration = config
  end

  def self.configure
    yield(configuration)
  end

end
# rubocop:enable Style/ClassAndModuleChildren

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_redis_db-1.1.0 lib/active_redis_db/configuration.rb
active_redis_db-1.0.2 lib/active_redis_db/configuration.rb
active_redis_db-1.0.1 lib/active_redis_db/configuration.rb
active_redis_db-1.0.0 lib/active_redis_db/configuration.rb