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.
86 87 88 |
# File 'lib/fare/test_mode.rb', line 86 def initialize @queues = {} end |
Instance Method Details
#clear ⇒ Object
102 103 104 |
# File 'lib/fare/test_mode.rb', line 102 def clear queues.each(&:clear) end |
#fetch(environment, queue_name) ⇒ Object
90 91 92 |
# File 'lib/fare/test_mode.rb', line 90 def fetch(environment, queue_name) @queues[queue_name] ||= FakeQueue.new(queue_name) end |
#fetch_by_arn(arn) ⇒ Object
94 95 96 |
# File 'lib/fare/test_mode.rb', line 94 def fetch_by_arn(arn) @queues.fetch(arn) end |
#queues ⇒ Object
98 99 100 |
# File 'lib/fare/test_mode.rb', line 98 def queues @queues.values end |