Module: Unleash
- Defined in:
- lib/unleash.rb,
lib/unleash/client.rb,
lib/unleash/context.rb,
lib/unleash/metrics.rb,
lib/unleash/variant.rb,
lib/unleash/version.rb,
lib/unleash/configuration.rb,
lib/unleash/strategy/base.rb,
lib/unleash/strategy/util.rb,
lib/unleash/feature_toggle.rb,
lib/unleash/toggle_fetcher.rb,
lib/unleash/metrics_reporter.rb,
lib/unleash/strategy/default.rb,
lib/unleash/variant_override.rb,
lib/unleash/scheduled_executor.rb,
lib/unleash/variant_definition.rb,
lib/unleash/activation_strategy.rb,
lib/unleash/strategy/user_with_id.rb,
lib/unleash/strategy/remote_address.rb,
lib/unleash/strategy/application_hostname.rb,
lib/unleash/strategy/gradual_rollout_random.rb,
lib/unleash/strategy/gradual_rollout_userid.rb,
lib/unleash/strategy/gradual_rollout_sessionid.rb
Defined Under Namespace
Modules: Strategy Classes: ActivationStrategy, Client, Configuration, Context, FeatureToggle, Metrics, MetricsReporter, ScheduledExecutor, ToggleFetcher, Variant, VariantDefinition, VariantOverride
Constant Summary collapse
- TIME_RESOLUTION =
3
- STRATEGIES =
Unleash::Strategy.constants .select { |c| Unleash::Strategy.const_get(c).is_a? Class } .select { |c| !['NotImplemented', 'Base'].include?(c.to_s) } .map { |c| lowered_c = c.to_s lowered_c[0] = lowered_c[0].downcase [lowered_c.to_sym, Object::const_get("Unleash::Strategy::#{c}").new] } .to_h
- VERSION =
"0.1.6"
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
-
.logger ⇒ Object
Returns the value of attribute logger.
-
.reporter ⇒ Object
Returns the value of attribute reporter.
-
.toggle_fetcher ⇒ Object
Returns the value of attribute toggle_fetcher.
-
.toggle_metrics ⇒ Object
Returns the value of attribute toggle_metrics.
-
.toggles ⇒ Object
Returns the value of attribute toggles.
Class Method Summary collapse
-
.configure {|configuration| ... } ⇒ Object
Support for configuration via yield:.
- .initialize ⇒ Object
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
24 25 26 |
# File 'lib/unleash.rb', line 24 def configuration @configuration end |
.logger ⇒ Object
Returns the value of attribute logger.
24 25 26 |
# File 'lib/unleash.rb', line 24 def logger @logger end |
.reporter ⇒ Object
Returns the value of attribute reporter.
24 25 26 |
# File 'lib/unleash.rb', line 24 def reporter @reporter end |
.toggle_fetcher ⇒ Object
Returns the value of attribute toggle_fetcher.
24 25 26 |
# File 'lib/unleash.rb', line 24 def toggle_fetcher @toggle_fetcher end |
.toggle_metrics ⇒ Object
Returns the value of attribute toggle_metrics.
24 25 26 |
# File 'lib/unleash.rb', line 24 def toggle_metrics @toggle_metrics end |
.toggles ⇒ Object
Returns the value of attribute toggles.
24 25 26 |
# File 'lib/unleash.rb', line 24 def toggles @toggles end |
Class Method Details
.configure {|configuration| ... } ⇒ Object
Support for configuration via yield:
33 34 35 36 37 38 39 |
# File 'lib/unleash.rb', line 33 def self.configure() self.configuration ||= Unleash::Configuration.new yield(configuration) self.configuration.validate! self.configuration.refresh_backup_file! end |
.initialize ⇒ Object
27 28 29 30 |
# File 'lib/unleash.rb', line 27 def self.initialize self.toggles = [] self.toggle_metrics = {} end |