From 903eabc1e4399d8216d7717122c2b7b7ce433d99 Mon Sep 17 00:00:00 2001 From: Micah Geisel Date: Sat, 9 May 2020 10:39:57 -0700 Subject: [PATCH] remove unused method. --- examples/lib/redis_models.rb | 8 -------- 1 file changed, 8 deletions(-) diff --git a/examples/lib/redis_models.rb b/examples/lib/redis_models.rb index 0477f7a..f384775 100644 --- a/examples/lib/redis_models.rb +++ b/examples/lib/redis_models.rb @@ -1,15 +1,10 @@ require 'redis' class RedisWidget - def self.redis threaded ||= Redis.new end - def self.redis=(connection) - threaded = connection - end - def self.threaded Thread.current[self.class.to_s] ||= {} end @@ -38,12 +33,10 @@ class RedisWidget def self.create! new(:name => 'some widget').save - end end class RedisWidgetUsingDatabaseOne < RedisWidget - def self.redis threaded[self.class.to_s] ||= Redis.new :url => ENV['REDIS_URL_ONE'] end @@ -54,7 +47,6 @@ class RedisWidgetUsingDatabaseOne < RedisWidget end class RedisWidgetUsingDatabaseTwo < RedisWidget - def self.redis threaded[self.class.to_s] ||= Redis.new :url => ENV['REDIS_URL_TWO'] end