Class: RServiceBus2::SendAtStorageInMemory
- Inherits:
-
Object
- Object
- RServiceBus2::SendAtStorageInMemory
- Defined in:
- lib/rservicebus2/sendat_storage/inmemory.rb
Overview
Send at storage in memory
Instance Method Summary collapse
- #add(msg) ⇒ Object
- #all ⇒ Object
- #delete(idx) ⇒ Object
-
#initialize(_uri) ⇒ SendAtStorageInMemory
constructor
A new instance of SendAtStorageInMemory.
Constructor Details
#initialize(_uri) ⇒ SendAtStorageInMemory
Returns a new instance of SendAtStorageInMemory.
4 5 6 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 4 def initialize(_uri) @list = [] end |
Instance Method Details
#add(msg) ⇒ Object
8 9 10 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 8 def add(msg) @list << msg end |
#all ⇒ Object
12 13 14 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 12 def all @list end |
#delete(idx) ⇒ Object
16 17 18 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 16 def delete(idx) @list.delete_at(idx) end |