Class: BigRails::Redis::Configuration
- Inherits:
-
Object
- Object
- BigRails::Redis::Configuration
- Defined in:
- lib/big_rails/redis/configuration.rb
Instance Attribute Summary collapse
-
#pool_options ⇒ Object
readonly
Returns the value of attribute pool_options.
-
#redis_options ⇒ Object
readonly
Returns the value of attribute redis_options.
-
#urls ⇒ Object
readonly
Returns the value of attribute urls.
Instance Method Summary collapse
-
#initialize(redis_options) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(redis_options) ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 |
# File 'lib/big_rails/redis/configuration.rb', line 10 def initialize() @redis_options = @urls = Array(.delete(:url)) @pool_options ||= {}.tap do || [:size] = .delete(:pool_size) if [:pool_size] [:timeout] = .delete(:pool_timeout) if [:pool_timeout] end end |
Instance Attribute Details
#pool_options ⇒ Object (readonly)
Returns the value of attribute pool_options.
7 8 9 |
# File 'lib/big_rails/redis/configuration.rb', line 7 def @pool_options end |
#redis_options ⇒ Object (readonly)
Returns the value of attribute redis_options.
6 7 8 |
# File 'lib/big_rails/redis/configuration.rb', line 6 def @redis_options end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
8 9 10 |
# File 'lib/big_rails/redis/configuration.rb', line 8 def urls @urls end |