Module: Stockpile::RedisConnections
- Defined in:
- lib/stockpile/redis_connections.rb
Overview
Stockpile::RedisConnections
Wrapper around pools of Redis connections to allow multiple Redis database support
Class Method Summary collapse
Class Method Details
.compression?(db:) ⇒ Boolean
25 26 27 |
# File 'lib/stockpile/redis_connections.rb', line 25 def compression?(db:) instance_variable_get("@#{db}_compression".to_sym) end |
.with(db:) ⇒ Object
29 30 31 32 33 |
# File 'lib/stockpile/redis_connections.rb', line 29 def with(db:) instance_variable_get("@#{db}".to_sym).with do |connection| yield connection end end |