Method: ConfigCat::ConfigCatClient#get_value_details
- Defined in:
- lib/configcat/configcatclient.rb
#get_value_details(key, default_value, user = nil) ⇒ Object
Gets the value and evaluation details of a feature flag or setting identified by the given ‘key`.
:param key [String] the identifier of the feature flag or setting. :param default_value in case of any failure, this value will be returned. :param user [User] the user object to identify the caller. :return [EvaluationDetails] the evaluation details.
135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/configcat/configcatclient.rb', line 135 def get_value_details(key, default_value, user = nil) config, fetch_time = _get_config() if config.nil? || config[FEATURE_FLAGS].nil? = "Config JSON is not present when evaluating setting '#{key}'. Returning the `default_value` parameter that you specified in your application: '#{default_value}'." @log.error(1000, ) details = EvaluationDetails.from_error(key, default_value, error: ) @hooks.invoke_on_flag_evaluated(details) return details end details = _evaluate(key, user, default_value, nil, config, fetch_time) return details end |