Class: Circuitry::Locks::Redis
- Inherits:
-
Object
- Object
- Circuitry::Locks::Redis
- Includes:
- Base
- Defined in:
- lib/circuitry/locks/redis.rb
Constant Summary
Constants included from Base
Base::DEFAULT_HARD_TTL, Base::DEFAULT_SOFT_TTL
Instance Attribute Summary
Attributes included from Base
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Redis
constructor
A new instance of Redis.
Methods included from Base
#hard_lock, #soft_lock, #unlock
Constructor Details
#initialize(options = {}) ⇒ Redis
Returns a new instance of Redis.
6 7 8 9 10 11 12 13 |
# File 'lib/circuitry/locks/redis.rb', line 6 def initialize( = {}) super() self.client = .fetch(:client) do require 'redis' ::Redis.new() end end |