Module: October::Redis
Class Method Summary collapse
Methods included from Environment
configuration, configuration!, environment, load_configuration
Class Method Details
.included(base) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/october/redis.rb', line 9 def self.included(base) return unless config = Redis.configuration('redis.yml') # FIXME: parhaps more options, fetch from redis directly, or pass them all and let redis to handle it? redis = ::Redis.new config.slice :host, :port, :path if config.has_key? :namespace redis = ::Redis::Namespace.new config[:namespace], :redis => redis end redis.incr 'launches' $redis = redis end |