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.
6 7 8 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 6 def initialize(_uri) @list = [] end |
Instance Method Details
#add(msg) ⇒ Object
10 11 12 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 10 def add(msg) @list << msg end |
#all ⇒ Object
14 15 16 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 14 def all @list end |
#delete(idx) ⇒ Object
18 19 20 |
# File 'lib/rservicebus2/sendat_storage/inmemory.rb', line 18 def delete(idx) @list.delete_at(idx) end |