Class: Namely::Configuration
- Inherits:
-
Object
- Object
- Namely::Configuration
- Defined in:
- lib/namely/configuration.rb
Instance Attribute Summary collapse
-
#http_codes_to_retry ⇒ Array<Integer>
The http codes that should be retried if a request fails while returning a page in paged results.
-
#retries ⇒ Integer
Controls the number of times that a request for a page that failed while returning paged results with one of the http codes listed in #http_codes_to_retry will be retried before raising an exception.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
28 29 30 31 |
# File 'lib/namely/configuration.rb', line 28 def initialize @http_codes_to_retry = [] @retries = 0 end |
Instance Attribute Details
#http_codes_to_retry ⇒ Array<Integer>
The http codes that should be retried if a request fails while returning a page in paged results. Number of times to retry specified in #retries. Defaults to an empty Array.
10 11 12 |
# File 'lib/namely/configuration.rb', line 10 def http_codes_to_retry @http_codes_to_retry end |
#retries ⇒ Integer
Controls the number of times that a request for a page that failed while returning paged results with one of the http codes listed in #http_codes_to_retry will be retried before raising an exception. 0 by default.
26 27 28 |
# File 'lib/namely/configuration.rb', line 26 def retries @retries end |