Class: Cardiac::OperationResult

Inherits:
Object
  • Object
show all
Defined in:
lib/cardiac/operation_handler.rb

Overview

This is what is returned by the OperationHandler.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#payloadObject

Returns the value of attribute payload.



9
10
11
# File 'lib/cardiac/operation_handler.rb', line 9

def payload
  @payload
end

#responseObject

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

Returns:

  • (Boolean)


21
# File 'lib/cardiac/operation_handler.rb', line 21

def aborted?; @aborted end

#completed?Boolean

Returns:

  • (Boolean)


20
# File 'lib/cardiac/operation_handler.rb', line 20

def completed?; @completed end

#transmitted?Boolean

Returns:

  • (Boolean)


19
# File 'lib/cardiac/operation_handler.rb', line 19

def transmitted?; @transmitted end