Class: Couchbase::Protostellar::Retry::Reason Private
- Inherits:
-
Object
- Object
- Couchbase::Protostellar::Retry::Reason
- Defined in:
- lib/couchbase/protostellar/retry/reason.rb
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.
Instance Attribute Summary collapse
- #allows_non_idempotent_retry ⇒ Object readonly private
- #always_retry ⇒ Object readonly private
- #name ⇒ Object readonly private
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name:, allows_non_idempotent_retry:, always_retry:) ⇒ Reason
constructor
private
A new instance of Reason.
- #to_s ⇒ Object private
Constructor Details
#initialize(name:, allows_non_idempotent_retry:, always_retry:) ⇒ Reason
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 a new instance of Reason.
34 35 36 37 38 |
# File 'lib/couchbase/protostellar/retry/reason.rb', line 34 def initialize(name:, allows_non_idempotent_retry:, always_retry:) @name = name @allows_non_idempotent_retry = allows_non_idempotent_retry @always_retry = always_retry end |
Instance Attribute Details
#allows_non_idempotent_retry ⇒ Object (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.
21 22 23 |
# File 'lib/couchbase/protostellar/retry/reason.rb', line 21 def allows_non_idempotent_retry @allows_non_idempotent_retry end |
#always_retry ⇒ Object (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.
22 23 24 |
# File 'lib/couchbase/protostellar/retry/reason.rb', line 22 def always_retry @always_retry end |
#name ⇒ Object (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.
23 24 25 |
# File 'lib/couchbase/protostellar/retry/reason.rb', line 23 def name @name end |
Class Method Details
.reason(name, allows_non_idempotent_retry:, always_retry:) ⇒ Object
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.
25 26 27 28 29 30 31 32 |
# File 'lib/couchbase/protostellar/retry/reason.rb', line 25 def self.reason(name, allows_non_idempotent_retry:, always_retry:) const_set( name, new(name: name, allows_non_idempotent_retry: allows_non_idempotent_retry, always_retry: always_retry).freeze ) end |
Instance Method Details
#to_s ⇒ Object
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.
40 41 42 |
# File 'lib/couchbase/protostellar/retry/reason.rb', line 40 def to_s @name.downcase.to_s end |