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.
208 |
# File 'sig/optify.rbs', line 208
def _get_canonical_feature_names: (::Array[String] feature_names) -> ::Array[String]
|
#conditions? ⇒ Object
Returns Whether the feature has conditions.
153 |
# File 'sig/optify.rbs', line 153
def conditions?: (String canonical_feature_name) -> bool
|
#features_with_metadata_json ⇒ Object
Returns All of the keys and values for the the features.
156 |
# File 'sig/optify.rbs', line 156
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.
163 |
# File 'sig/optify.rbs', line 163
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.
171 |
# File 'sig/optify.rbs', line 171
def get_canonical_feature_names: (::Array[String] feature_names) -> ::Array[String]
|
#get_feature_metadata ⇒ Object
Returns The metadata for the feature.
174 |
# File 'sig/optify.rbs', line 174
def get_feature_metadata: (String canonical_feature_name) -> OptionsMetadata?
|
#get_feature_metadata_json ⇒ Object
Returns The metadata for the feature.
211 |
# File 'sig/optify.rbs', line 211
def get_feature_metadata_json: (String canonical_feature_name) -> String?
|
#get_filtered_features ⇒ ::Array[String]
176 |
# File 'sig/optify.rbs', line 176
def get_filtered_features: (::Array[String] feature_names, GetOptionsPreferences preferences) -> ::Array[String]
|
#get_options ⇒ void
This method returns an undefined value.
178 |
# File 'sig/optify.rbs', line 178
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.
185 |
# File 'sig/optify.rbs', line 185
def get_options_hash: (String key, ::Array[String] feature_names) -> ::Hash[String, untyped]
|
#get_options_hash_with_preferences ⇒ ::Hash[String, untyped]
187 |
# File 'sig/optify.rbs', line 187
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.
194 |
# File 'sig/optify.rbs', line 194
def get_options_json: (String key, ::Array[String] feature_names) -> String
|
#get_options_json_with_preferences ⇒ String
196 |
# File 'sig/optify.rbs', line 196
def get_options_json_with_preferences: (String key, ::Array[String] feature_names, GetOptionsPreferences preferences) -> String
|
#init ⇒ self
198 |
# File 'sig/optify.rbs', line 198
def init: (?CacheInitOptions? cache_init_options) -> self
|
#map_feature_names ⇒ ::Array[String?]
200 |
# File 'sig/optify.rbs', line 200
def map_feature_names: (::Array[String] feature_names, GetOptionsPreferences preferences) -> ::Array[String?]
|