Class: FakeSQS::QueueFactory
- Inherits:
-
Object
- Object
- FakeSQS::QueueFactory
- Defined in:
- lib/fake_sqs/queue_factory.rb
Instance Attribute Summary collapse
-
#message_factory ⇒ Object
readonly
Returns the value of attribute message_factory.
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ QueueFactory
constructor
A new instance of QueueFactory.
- #new(options) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ QueueFactory
Returns a new instance of QueueFactory.
6 7 8 9 |
# File 'lib/fake_sqs/queue_factory.rb', line 6 def initialize( = {}) @message_factory = .fetch(:message_factory) @queue = .fetch(:queue) end |
Instance Attribute Details
#message_factory ⇒ Object (readonly)
Returns the value of attribute message_factory.
4 5 6 |
# File 'lib/fake_sqs/queue_factory.rb', line 4 def @message_factory end |
#queue ⇒ Object (readonly)
Returns the value of attribute queue.
4 5 6 |
# File 'lib/fake_sqs/queue_factory.rb', line 4 def queue @queue end |
Instance Method Details
#new(options) ⇒ Object
11 12 13 |
# File 'lib/fake_sqs/queue_factory.rb', line 11 def new() queue.new(.merge(:message_factory => )) end |