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