Class: LaunchDarkly::Impl::DataSystem::DataAvailability Private
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::DataSystem::DataAvailability
- Defined in:
- lib/ldclient-rb/impl/data_system.rb
Overview
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.
Represents the availability of data in the SDK.
Constant Summary collapse
- DEFAULTS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The SDK has no data and will evaluate flags using the application-provided default values.
:defaults- CACHED =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The SDK has data, not necessarily the latest, which will be used to evaluate flags.
:cached- REFRESHED =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The SDK has obtained, at least once, the latest known data from LaunchDarkly.
:refreshed- ALL =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
[DEFAULTS, CACHED, REFRESHED].freeze
Class Method Summary collapse
-
.at_least?(self_level, other) ⇒ Boolean
private
Returns whether this availability level is **at least** as good as the other.
Class Method Details
.at_least?(self_level, other) ⇒ Boolean
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 whether this availability level is **at least** as good as the other.
144 145 146 147 148 149 150 |
# File 'lib/ldclient-rb/impl/data_system.rb', line 144 def self.at_least?(self_level, other) return true if self_level == other return true if self_level == REFRESHED return true if self_level == CACHED && other == DEFAULTS false end |