Class: Typhoid::QueuedRequest
- Inherits:
-
Object
- Object
- Typhoid::QueuedRequest
- Defined in:
- lib/typhoid/queued_request.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
Returns the value of attribute klass.
-
#name ⇒ Object
Returns the value of attribute name.
-
#on_complete ⇒ Object
Returns the value of attribute on_complete.
-
#request ⇒ Object
Returns the value of attribute request.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(hydra, name, req, target) ⇒ QueuedRequest
constructor
A new instance of QueuedRequest.
- #response ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(hydra, name, req, target) ⇒ QueuedRequest
Returns a new instance of QueuedRequest.
6 7 8 9 10 11 12 |
# File 'lib/typhoid/queued_request.rb', line 6 def initialize(hydra, name, req, target) self.name = name self.request = Request.new(req.request_uri, req.) self.klass = req.klass self.target = target hydra.queue(request) end |
Instance Attribute Details
#klass ⇒ Object
Returns the value of attribute klass.
3 4 5 |
# File 'lib/typhoid/queued_request.rb', line 3 def klass @klass end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/typhoid/queued_request.rb', line 3 def name @name end |
#on_complete ⇒ Object
Returns the value of attribute on_complete.
4 5 6 |
# File 'lib/typhoid/queued_request.rb', line 4 def on_complete @on_complete end |
#request ⇒ Object
Returns the value of attribute request.
3 4 5 |
# File 'lib/typhoid/queued_request.rb', line 3 def request @request end |
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/typhoid/queued_request.rb', line 3 def target @target end |
Instance Method Details
#response ⇒ Object
24 25 26 |
# File 'lib/typhoid/queued_request.rb', line 24 def response request.response end |
#status ⇒ Object
20 21 22 |
# File 'lib/typhoid/queued_request.rb', line 20 def status response.code end |