Class: Fare::TestMode::QueueAdapter
- Inherits:
-
Object
- Object
- Fare::TestMode::QueueAdapter
- Defined in:
- lib/fare/test_mode.rb
Defined Under Namespace
Classes: FakeQueue
Instance Method Summary collapse
- #clear ⇒ Object
- #fetch(environment, queue_name) ⇒ Object
- #fetch_by_arn(arn) ⇒ Object
-
#initialize ⇒ QueueAdapter
constructor
A new instance of QueueAdapter.
- #queues ⇒ Object
Constructor Details
#initialize ⇒ QueueAdapter
Returns a new instance of QueueAdapter.
92 93 94 |
# File 'lib/fare/test_mode.rb', line 92 def initialize @queues = {} end |
Instance Method Details
#clear ⇒ Object
108 109 110 |
# File 'lib/fare/test_mode.rb', line 108 def clear queues.each(&:clear) end |
#fetch(environment, queue_name) ⇒ Object
96 97 98 |
# File 'lib/fare/test_mode.rb', line 96 def fetch(environment, queue_name) @queues[queue_name] ||= FakeQueue.new(queue_name) end |
#fetch_by_arn(arn) ⇒ Object
100 101 102 |
# File 'lib/fare/test_mode.rb', line 100 def fetch_by_arn(arn) @queues.fetch(arn) end |
#queues ⇒ Object
104 105 106 |
# File 'lib/fare/test_mode.rb', line 104 def queues @queues.values end |