Class: Fare::TestMode::QueueAdapter::FakeQueue
- Inherits:
-
Object
- Object
- Fare::TestMode::QueueAdapter::FakeQueue
- Defined in:
- lib/fare/test_mode.rb
Defined Under Namespace
Classes: Item
Instance Attribute Summary collapse
-
#arn ⇒ Object
readonly
Returns the value of attribute arn.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
- #clear ⇒ Object
- #delete ⇒ Object
-
#initialize(name) ⇒ FakeQueue
constructor
A new instance of FakeQueue.
- #policy=(val) ⇒ Object
- #publish(message) ⇒ Object
- #receive_message ⇒ Object
- #size ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(name) ⇒ FakeQueue
Returns a new instance of FakeQueue.
121 122 123 124 |
# File 'lib/fare/test_mode.rb', line 121 def initialize(name) @arn = name = [] end |
Instance Attribute Details
#arn ⇒ Object (readonly)
Returns the value of attribute arn.
119 120 121 |
# File 'lib/fare/test_mode.rb', line 119 def arn @arn end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
119 120 121 |
# File 'lib/fare/test_mode.rb', line 119 def end |
Instance Method Details
#clear ⇒ Object
146 147 148 |
# File 'lib/fare/test_mode.rb', line 146 def clear = [] end |
#delete ⇒ Object
142 143 144 |
# File 'lib/fare/test_mode.rb', line 142 def delete .delete_at(0) end |
#policy=(val) ⇒ Object
126 127 |
# File 'lib/fare/test_mode.rb', line 126 def policy=(val) end |
#publish(message) ⇒ Object
133 134 135 |
# File 'lib/fare/test_mode.rb', line 133 def publish() << end |
#receive_message ⇒ Object
137 138 139 140 |
# File 'lib/fare/test_mode.rb', line 137 def (*) return nil if .size == 0 Item.new(self, [0]) end |
#size ⇒ Object
150 151 152 |
# File 'lib/fare/test_mode.rb', line 150 def size .size end |
#url ⇒ Object
129 130 131 |
# File 'lib/fare/test_mode.rb', line 129 def url "http://#{arn}.sqs" end |