remove unused method.

This commit is contained in:
Micah Geisel 2020-05-09 10:39:57 -07:00
parent a5f9703446
commit 903eabc1e4

View file

@ -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