class BubBot::RedisConnection

Just a simple wrapper around a redis connection. Call .instance on this, then call anything you'd normally call on a Redis on object on this instead. Eg `RedisConnection.instance.hgetall(…)`.

Public Instance Methods

method_missing(method, *args, &block) click to toggle source
Calls superclass method
# File lib/bub_bot/redis_connection.rb, line 10
def method_missing(method, *args, &block)
  redis.respond_to?(method) ? redis.public_send(method, *args, &block) : super
end
redis() click to toggle source
# File lib/bub_bot/redis_connection.rb, line 13
def redis
  @redis ||= Redis.new(url: 'redis://' + BubBot.configuration.redis_host)
end