Module: Optify
- Defined in:
- lib/optify_ruby/implementation.rb,
lib/optify_ruby/base_config.rb,
lib/optify_ruby/provider_module.rb,
lib/optify_ruby/options_metadata.rb,
lib/optify_ruby/cache_init_options.rb,
lib/optify_ruby/watcher_implementation.rb,
lib/optify_ruby/get_options_preferences.rb,
sig/optify.rbs,
sig/optify.rbs,
sig/optify.rbs
Overview
A module only for internal use that provides the methods to help implement providers. Some of the methods shown within this module are implemented in Rust and are declared in this common module to avoid duplicate declarations in different classes.
Defined Under Namespace
Modules: CacheMode Classes: BaseConfig, CacheInitOptions, CacheOptions, GetOptionsPreferences, OptionsMetadata, OptionsProvider, OptionsProviderBuilder, OptionsRegistry, OptionsWatcherBuilder, UnknownFeatureError
Instance Method Summary collapse
-
#_get_canonical_feature_names ⇒ Object
Map aliases or canonical feature names (perhaps derived from a file names) to the canonical feature names.
-
#conditions? ⇒ Object
Whether the feature has conditions.
-
#features_with_metadata_json ⇒ Object
All of the keys and values for the the features.
-
#get_canonical_feature_name ⇒ Object
Map an alias or canonical feature name (perhaps derived from a file name) to a canonical feature name.
-
#get_canonical_feature_names ⇒ Object
Map aliases or canonical feature names (perhaps derived from a file names) to the canonical feature names.
-
#get_feature_metadata ⇒ Object
The metadata for the feature.
-
#get_feature_metadata_json ⇒ Object
The metadata for the feature.
- #get_filtered_features ⇒ ::Array[String]
- #get_options ⇒ void
-
#get_options_hash ⇒ Hash[String, T.untyped]
Fetches options based on the provided key and feature names.
- #get_options_hash_with_preferences ⇒ ::Hash[String, untyped]
-
#get_options_json ⇒ String
Fetches options in JSON format based on the provided key and feature names.
- #get_options_json_with_preferences ⇒ String
- #init ⇒ self
- #map_feature_names ⇒ ::Array[String?]
Instance Method Details
#_get_canonical_feature_names ⇒ Object
Map aliases or canonical feature names (perhaps derived from a file names) to the canonical feature names. Canonical feature names map to themselves. This implementation calls the Rust implementation directly.
209 |
# File 'sig/optify.rbs', line 209
def _get_canonical_feature_names: (::Array[String] feature_names) -> ::Array[String]
|
#conditions? ⇒ Object
Returns Whether the feature has conditions.
154 |
# File 'sig/optify.rbs', line 154
def conditions?: (String canonical_feature_name) -> bool
|
#features_with_metadata_json ⇒ Object
Returns All of the keys and values for the the features.
157 |
# File 'sig/optify.rbs', line 157
def features_with_metadata_json: () -> String
|
#get_canonical_feature_name ⇒ Object
Map an alias or canonical feature name (perhaps derived from a file name) to a canonical feature name. Canonical feature names map to themselves.
164 |
# File 'sig/optify.rbs', line 164
def get_canonical_feature_name: (String feature_name) -> String
|
#get_canonical_feature_names ⇒ Object
Map aliases or canonical feature names (perhaps derived from a file names) to the canonical feature names. Canonical feature names map to themselves. This implementation may do an optimization for small arrays.
172 |
# File 'sig/optify.rbs', line 172
def get_canonical_feature_names: (::Array[String] feature_names) -> ::Array[String]
|
#get_feature_metadata ⇒ Object
Returns The metadata for the feature.
175 |
# File 'sig/optify.rbs', line 175
def get_feature_metadata: (String canonical_feature_name) -> OptionsMetadata?
|
#get_feature_metadata_json ⇒ Object
Returns The metadata for the feature.
212 |
# File 'sig/optify.rbs', line 212
def get_feature_metadata_json: (String canonical_feature_name) -> String?
|
#get_filtered_features ⇒ ::Array[String]
177 |
# File 'sig/optify.rbs', line 177
def get_filtered_features: (::Array[String] feature_names, GetOptionsPreferences preferences) -> ::Array[String]
|
#get_options ⇒ void
This method returns an undefined value.
179 |
# File 'sig/optify.rbs', line 179
def get_options: [Config] (String key, ::Array[String] feature_names, T::Class[Config] config_class, ?CacheOptions? cache_options, ?Optify::GetOptionsPreferences? preferences) -> Config
|
#get_options_hash ⇒ Hash[String, T.untyped]
Fetches options based on the provided key and feature names.
186 |
# File 'sig/optify.rbs', line 186
def get_options_hash: (String key, ::Array[String] feature_names) -> ::Hash[String, untyped]
|
#get_options_hash_with_preferences ⇒ ::Hash[String, untyped]
188 |
# File 'sig/optify.rbs', line 188
def get_options_hash_with_preferences: (String key, ::Array[String] feature_names, GetOptionsPreferences preferences) -> ::Hash[String, untyped]
|
#get_options_json ⇒ String
Fetches options in JSON format based on the provided key and feature names.
195 |
# File 'sig/optify.rbs', line 195
def get_options_json: (String key, ::Array[String] feature_names) -> String
|
#get_options_json_with_preferences ⇒ String
197 |
# File 'sig/optify.rbs', line 197
def get_options_json_with_preferences: (String key, ::Array[String] feature_names, GetOptionsPreferences preferences) -> String
|
#init ⇒ self
199 |
# File 'sig/optify.rbs', line 199
def init: (?CacheInitOptions? cache_init_options) -> self
|
#map_feature_names ⇒ ::Array[String?]
201 |
# File 'sig/optify.rbs', line 201
def map_feature_names: (::Array[String] feature_names, GetOptionsPreferences preferences) -> ::Array[String?]
|