Class: TempmailSdk::Retry::AttemptsResult
- Inherits:
-
Object
- Object
- TempmailSdk::Retry::AttemptsResult
- Defined in:
- lib/tempmail_sdk/retry.rb
Overview
with_retry_with_attempts 的返回值封装
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#ok ⇒ Object
readonly
Returns the value of attribute ok.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(ok:, attempts:, value: nil, error: nil) ⇒ AttemptsResult
constructor
A new instance of AttemptsResult.
- #ok? ⇒ Boolean
Constructor Details
#initialize(ok:, attempts:, value: nil, error: nil) ⇒ AttemptsResult
Returns a new instance of AttemptsResult.
11 12 13 14 15 16 |
# File 'lib/tempmail_sdk/retry.rb', line 11 def initialize(ok:, attempts:, value: nil, error: nil) @ok = ok @attempts = attempts @value = value @error = error end |
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts.
9 10 11 |
# File 'lib/tempmail_sdk/retry.rb', line 9 def attempts @attempts end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
9 10 11 |
# File 'lib/tempmail_sdk/retry.rb', line 9 def error @error end |
#ok ⇒ Object (readonly)
Returns the value of attribute ok.
9 10 11 |
# File 'lib/tempmail_sdk/retry.rb', line 9 def ok @ok end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/tempmail_sdk/retry.rb', line 9 def value @value end |
Instance Method Details
#ok? ⇒ Boolean
18 19 20 |
# File 'lib/tempmail_sdk/retry.rb', line 18 def ok? @ok end |