Class: Cardiac::OperationResult
- Inherits:
-
Object
- Object
- Cardiac::OperationResult
- Defined in:
- lib/cardiac/operation_handler.rb
Overview
This is what is returned by the OperationHandler.
Instance Attribute Summary collapse
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
- #aborted? ⇒ Boolean
- #completed? ⇒ Boolean
-
#initialize(handled, response, payload = nil) ⇒ OperationResult
constructor
A new instance of OperationResult.
- #transmitted? ⇒ Boolean
Constructor Details
#initialize(handled, response, payload = nil) ⇒ OperationResult
Returns a new instance of OperationResult.
11 12 13 14 15 16 17 |
# File 'lib/cardiac/operation_handler.rb', line 11 def initialize(handled, response, payload=nil) @transmitted = !! handled.transmitted? @completed = !! handled.completed? @aborted = !! handled.aborted? @response = response @payload = payload end |
Instance Attribute Details
#payload ⇒ Object
Returns the value of attribute payload.
9 10 11 |
# File 'lib/cardiac/operation_handler.rb', line 9 def payload @payload end |
#response ⇒ Object
Returns the value of attribute response.
9 10 11 |
# File 'lib/cardiac/operation_handler.rb', line 9 def response @response end |
Instance Method Details
#aborted? ⇒ Boolean
21 |
# File 'lib/cardiac/operation_handler.rb', line 21 def aborted?; @aborted end |
#completed? ⇒ Boolean
20 |
# File 'lib/cardiac/operation_handler.rb', line 20 def completed?; @completed end |
#transmitted? ⇒ Boolean
19 |
# File 'lib/cardiac/operation_handler.rb', line 19 def transmitted?; @transmitted end |