Sha256: 2e9e3d1280bb7b845ac152a2f65cae66058a5ea68f3a24f173eed08ade467003
Contents?: true
Size: 608 Bytes
Versions: 2
Compression:
Stored size: 608 Bytes
Contents
module Basket class Configuration attr_accessor :redis_host, :redis_port, :redis_db, :namespace, :redis_url attr_reader :backend def initialize @redis_host = "127.0.0.1" @redis_port = 6379 @redis_db = 15 @backend = BackendAdapter::MemoryBackend @namespace = :basket @redis_url = nil end def backend=(backend) case backend when :memory @backend = BackendAdapter::MemoryBackend when :redis @backend = BackendAdapter::RedisBackend else raise Basket::Error, "Unknown Backend" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
basket-0.0.7 | lib/basket/configuration.rb |
basket-0.0.6 | lib/basket/configuration.rb |