Class: SimpleEventSourcing::Events::EventStore::RedisClientMock
- Inherits:
-
Object
- Object
- SimpleEventSourcing::Events::EventStore::RedisClientMock
- Defined in:
- lib/simple_event_sourcing/events/event_store/redis/redis_client.rb
Instance Attribute Summary collapse
-
#entries ⇒ Object
readonly
Returns the value of attribute entries.
Instance Method Summary collapse
-
#initialize ⇒ RedisClientMock
constructor
A new instance of RedisClientMock.
- #lrange(key, inf, max) ⇒ Object
- #rpush(key, value) ⇒ Object
Constructor Details
#initialize ⇒ RedisClientMock
Returns a new instance of RedisClientMock.
51 52 53 |
# File 'lib/simple_event_sourcing/events/event_store/redis/redis_client.rb', line 51 def initialize @entries = Hash.new() end |
Instance Attribute Details
#entries ⇒ Object (readonly)
Returns the value of attribute entries.
49 50 51 |
# File 'lib/simple_event_sourcing/events/event_store/redis/redis_client.rb', line 49 def entries @entries end |
Instance Method Details
#lrange(key, inf, max) ⇒ Object
58 59 60 61 |
# File 'lib/simple_event_sourcing/events/event_store/redis/redis_client.rb', line 58 def lrange(key,inf,max) @entries[key] ||= [] return @entries[key] end |
#rpush(key, value) ⇒ Object
54 55 56 57 |
# File 'lib/simple_event_sourcing/events/event_store/redis/redis_client.rb', line 54 def rpush(key, value) @entries[key] ||= [] @entries[key] << value end |