Class: Namely::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/namely/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_retryArray<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.

Returns:

  • (Array<Integer>)

    the http codes to retry for a failed request

See Also:



10
11
12
# File 'lib/namely/configuration.rb', line 10

def http_codes_to_retry
  @http_codes_to_retry
end

#retriesInteger

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.

Returns:

  • (Integer)

    number of times to retry request.



26
27
28
# File 'lib/namely/configuration.rb', line 26

def retries
  @retries
end