Class: LaunchDarkly::Impl::DataSystem::DataAvailability
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::DataSystem::DataAvailability
- Defined in:
- lib/ldclient-rb/impl/data_system.rb
Overview
Represents the availability of data in the SDK.
Constant Summary collapse
- DEFAULTS =
The SDK has no data and will evaluate flags using the application-provided default values.
:defaults- CACHED =
The SDK has data, not necessarily the latest, which will be used to evaluate flags.
:cached- REFRESHED =
The SDK has obtained, at least once, the latest known data from LaunchDarkly.
:refreshed- ALL =
[DEFAULTS, CACHED, REFRESHED].freeze
Class Method Summary collapse
-
.at_least?(self_level, other) ⇒ Boolean
Returns whether this availability level is **at least** as good as the other.
Class Method Details
.at_least?(self_level, other) ⇒ Boolean
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 |