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.
116 117 118 119 |
# File 'lib/fare/test_mode.rb', line 116 def initialize(name) @arn = name = [] end |
Instance Attribute Details
#arn ⇒ Object (readonly)
Returns the value of attribute arn.
114 115 116 |
# File 'lib/fare/test_mode.rb', line 114 def arn @arn end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
114 115 116 |
# File 'lib/fare/test_mode.rb', line 114 def end |
Instance Method Details
#clear ⇒ Object
141 142 143 |
# File 'lib/fare/test_mode.rb', line 141 def clear = [] end |
#delete ⇒ Object
137 138 139 |
# File 'lib/fare/test_mode.rb', line 137 def delete .delete_at(0) end |
#policy=(val) ⇒ Object
121 122 |
# File 'lib/fare/test_mode.rb', line 121 def policy=(val) end |
#publish(message) ⇒ Object
128 129 130 |
# File 'lib/fare/test_mode.rb', line 128 def publish() << end |
#receive_message ⇒ Object
132 133 134 135 |
# File 'lib/fare/test_mode.rb', line 132 def (*) return nil if .size == 0 Item.new(self, [0]) end |
#size ⇒ Object
145 146 147 |
# File 'lib/fare/test_mode.rb', line 145 def size .size end |
#url ⇒ Object
124 125 126 |
# File 'lib/fare/test_mode.rb', line 124 def url "http://#{arn}.sqs" end |