Class: DynamicLinks::RedisConfig
- Inherits:
-
Object
- Object
- DynamicLinks::RedisConfig
- Defined in:
- lib/dynamic_links/redis_config.rb
Overview
RedisConfig is a class to hold Redis configuration
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#pool_size ⇒ Object
Returns the value of attribute pool_size.
-
#pool_timeout ⇒ Object
Returns the value of attribute pool_timeout.
Instance Method Summary collapse
-
#initialize(config = {}, pool_size = 5, pool_timeout = 5) ⇒ RedisConfig
constructor
Default to an empty hash, can be overridden config = { host: ‘localhost’, port: 6379 }.
Constructor Details
#initialize(config = {}, pool_size = 5, pool_timeout = 5) ⇒ RedisConfig
Default to an empty hash, can be overridden
config = {
host: 'localhost',
port: 6379
}
16 17 18 19 20 |
# File 'lib/dynamic_links/redis_config.rb', line 16 def initialize(config = {}, pool_size = 5, pool_timeout = 5) @config = config @pool_size = pool_size @pool_timeout = pool_timeout end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
6 7 8 |
# File 'lib/dynamic_links/redis_config.rb', line 6 def config @config end |
#pool_size ⇒ Object
Returns the value of attribute pool_size.
6 7 8 |
# File 'lib/dynamic_links/redis_config.rb', line 6 def pool_size @pool_size end |
#pool_timeout ⇒ Object
Returns the value of attribute pool_timeout.
6 7 8 |
# File 'lib/dynamic_links/redis_config.rb', line 6 def pool_timeout @pool_timeout end |