Sha256: 331229c0d8c99a3dd2f940f2551e2dd9962123907a13d3388ccbae596de944dc

Contents?: true

Size: 335 Bytes

Versions: 10

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true

module RedisWebManager
  class Base
    attr_accessor :instance

    def initialize(instance)
      @instance = instance || redises.keys[0]
    end

    private

    def redis
      @redis ||= redises[instance.to_sym]
    end

    def redises
      @redises ||= RedisWebManager.redises
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
redis_web_manager-0.4.0 lib/redis_web_manager/base.rb
redis_web_manager-0.3.9 lib/redis_web_manager/base.rb
redis_web_manager-0.3.8 lib/redis_web_manager/base.rb
redis_web_manager-0.3.6 lib/redis_web_manager/base.rb
redis_web_manager-0.3.5 lib/redis_web_manager/base.rb
redis_web_manager-0.3.4 lib/redis_web_manager/base.rb
redis_web_manager-0.3.3 lib/redis_web_manager/base.rb
redis_web_manager-0.3.2 lib/redis_web_manager/base.rb
redis_web_manager-0.3.1 lib/redis_web_manager/base.rb
redis_web_manager-0.3.0 lib/redis_web_manager/base.rb