Class: Redis
- Inherits:
-
Object
- Object
- Redis
- Defined in:
- lib/semian/redis.rb
Defined Under Namespace
Classes: SemianError
Constant Summary collapse
- ResourceBusyError =
Class.new(SemianError)
- CircuitOpenError =
Class.new(SemianError)
Instance Attribute Summary collapse
-
#semian_resource ⇒ Object
readonly
Returns the value of attribute semian_resource.
Instance Method Summary collapse
- #_original_initialize ⇒ Object
-
#initialize(*args, &block) ⇒ Redis
constructor
A new instance of Redis.
- #semian_identifier ⇒ Object
Constructor Details
#initialize(*args, &block) ⇒ Redis
Returns a new instance of Redis.
22 23 24 25 26 27 28 29 |
# File 'lib/semian/redis.rb', line 22 def initialize(*args, &block) _original_initialize(*args, &block) # This alias is necessary because during a `pipelined` block # the client is replaced by an instance of `Redis::Pipeline` and there is # no way to access the original client. @semian_resource = client.semian_resource end |
Instance Attribute Details
#semian_resource ⇒ Object (readonly)
Returns the value of attribute semian_resource.
18 19 20 |
# File 'lib/semian/redis.rb', line 18 def semian_resource @semian_resource end |
Instance Method Details
#_original_initialize ⇒ Object
20 |
# File 'lib/semian/redis.rb', line 20 alias_method :_original_initialize, :initialize |
#semian_identifier ⇒ Object
31 32 33 |
# File 'lib/semian/redis.rb', line 31 def semian_identifier semian_resource.name end |