Class: GQTP::SequentialRequest
- Inherits:
-
Object
- Object
- GQTP::SequentialRequest
- Defined in:
- lib/gqtp/sequential-request.rb
Instance Method Summary collapse
- #<<(request) ⇒ Object
-
#initialize ⇒ SequentialRequest
constructor
A new instance of SequentialRequest.
- #wait ⇒ Object
Constructor Details
#initialize ⇒ SequentialRequest
Returns a new instance of SequentialRequest.
21 22 23 |
# File 'lib/gqtp/sequential-request.rb', line 21 def initialize @requests = [] end |
Instance Method Details
#<<(request) ⇒ Object
31 32 33 |
# File 'lib/gqtp/sequential-request.rb', line 31 def <<(request) @requests << request end |
#wait ⇒ Object
25 26 27 28 29 |
# File 'lib/gqtp/sequential-request.rb', line 25 def wait while (request = @requests.pop) request.wait end end |