Class: GenevaDrive::FlowControlSignal Private

Inherits:
Object
  • Object
show all
Defined in:
lib/geneva_drive/flow_control.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Signal object used for flow control via throw/catch mechanism. Contains the action to take and any additional options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, **options) ⇒ FlowControlSignal

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Creates a new flow control signal.

Parameters:

  • action (Symbol)

    the flow control action

  • options (Hash)

    additional options (e.g., wait: for reattempt)



18
19
20
21
# File 'lib/geneva_drive/flow_control.rb', line 18

def initialize(action, **options)
  @action = action
  @options = options
end

Instance Attribute Details

#actionSymbol (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the action to take (:cancel, :pause, :reattempt, :skip, :finished).

Returns:

  • (Symbol)

    the action to take (:cancel, :pause, :reattempt, :skip, :finished)



9
10
11
# File 'lib/geneva_drive/flow_control.rb', line 9

def action
  @action
end

#optionsHash (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns additional options for the flow control action.

Returns:

  • (Hash)

    additional options for the flow control action



12
13
14
# File 'lib/geneva_drive/flow_control.rb', line 12

def options
  @options
end