Class: Mindee::Input::PollingOptions
- Inherits:
-
Object
- Object
- Mindee::Input::PollingOptions
- Defined in:
- lib/mindee/input/polling_options.rb
Overview
Options for asynchronous polling.
Instance Attribute Summary collapse
-
#delay_sec ⇒ Integer, Float
readonly
Delay between each polling attempt (in seconds).
-
#initial_delay_sec ⇒ Integer, Float
readonly
Initial delay before the first polling attempt (in seconds).
-
#max_retries ⇒ Integer
readonly
Total number of polling attempts.
Instance Method Summary collapse
-
#initialize(initial_delay_sec: 2.0, delay_sec: 1.5, max_retries: 80) ⇒ PollingOptions
constructor
A new instance of PollingOptions.
Constructor Details
#initialize(initial_delay_sec: 2.0, delay_sec: 1.5, max_retries: 80) ⇒ PollingOptions
Returns a new instance of PollingOptions.
19 20 21 22 23 |
# File 'lib/mindee/input/polling_options.rb', line 19 def initialize(initial_delay_sec: 2.0, delay_sec: 1.5, max_retries: 80) @initial_delay_sec = initial_delay_sec @delay_sec = delay_sec @max_retries = max_retries end |
Instance Attribute Details
#delay_sec ⇒ Integer, Float (readonly)
Returns Delay between each polling attempt (in seconds).
11 12 13 |
# File 'lib/mindee/input/polling_options.rb', line 11 def delay_sec @delay_sec end |
#initial_delay_sec ⇒ Integer, Float (readonly)
Returns Initial delay before the first polling attempt (in seconds).
8 9 10 |
# File 'lib/mindee/input/polling_options.rb', line 8 def initial_delay_sec @initial_delay_sec end |
#max_retries ⇒ Integer (readonly)
Returns Total number of polling attempts.
14 15 16 |
# File 'lib/mindee/input/polling_options.rb', line 14 def max_retries @max_retries end |