Class: Rox::Core::ConfigurationFetcherSelfManaged
- Inherits:
-
ConfigurationFetcherBase
- Object
- ConfigurationFetcherBase
- Rox::Core::ConfigurationFetcherSelfManaged
- Defined in:
- lib/rox/core/network/configuration_fetcher_self_managed.rb
Instance Method Summary collapse
Methods inherited from ConfigurationFetcherBase
#initialize, #write_fetch_error_to_log_and_invoke_fetch_handler, #write_fetch_exception_to_log_and_invoke_fetch_handler
Constructor Details
This class inherits a constructor from Rox::Core::ConfigurationFetcherBase
Instance Method Details
#fetch ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rox/core/network/configuration_fetcher_self_managed.rb', line 8 def fetch source = ConfigurationSource::API begin fetch_result = fetch_from_api if fetch_result.success? return ConfigurationFetchResult.new(fetch_result.text, source) else write_fetch_error_to_log_and_invoke_fetch_handler(source, fetch_result) end rescue StandardError => e write_fetch_exception_to_log_and_invoke_fetch_handler(source, e) end nil end |
#fetch_from_api ⇒ Object
24 25 26 27 |
# File 'lib/rox/core/network/configuration_fetcher_self_managed.rb', line 24 def fetch_from_api api_request = @request_configuration_builder.build_for_api @request.send_post(api_request.url, api_request.query_params) end |