Class: Tavern::History::Redis
Instance Attribute Summary collapse
-
#redis ⇒ Object
readonly
Returns the value of attribute redis.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(hub, keyspace, redis = ::Redis.current) ⇒ Redis
constructor
A new instance of Redis.
Methods inherited from Base
#history, #persist, #publish, #subscribe, #unsubscribe
Constructor Details
#initialize(hub, keyspace, redis = ::Redis.current) ⇒ Redis
Returns a new instance of Redis.
10 11 12 13 14 15 16 17 |
# File 'lib/tavern/history/redis.rb', line 10 def initialize(hub, keyspace, redis = ::Redis.current) super hub @redis = redis @base_key = "#{keyspace}:history" @counter = "#{@base_key}:counter" @records = "#{@base_key}:records" @stream_base = "#{@base_key}:entries" end |
Instance Attribute Details
#redis ⇒ Object (readonly)
Returns the value of attribute redis.
8 9 10 |
# File 'lib/tavern/history/redis.rb', line 8 def redis @redis end |