lib/monocle.rb in monocle-0.2.5 vs lib/monocle.rb in monocle-0.2.6
- old
+ new
@@ -25,10 +25,10 @@
weekly: -> { Time.now.beginning_of_week },
daily: -> { Time.now.beginning_of_day },
hourly: -> { Time.now.beginning_of_hour }
}
- self._monocle_redis_connection = Redis.new || REDIS
+ self._monocle_redis_connection = $redis || REDIS || Redis.new
end
module ClassMethods
def monocle_key(*append)
extra = (append.empty?) ? '' : ':' + append.join(':')