SimpleFeatureFlags (Simple Feature Flags v0.1.3)

View Source

This module includes functions for checking whether a feature is enabled (enabled?/1), and for introspecting configuration (current_configuration_to_string/0).

Summary

Functions

Return the current configuration as a human-friendly string.

Is feature x enabled in the current deployment environment?

Functions

current_configuration_to_string()

Return the current configuration as a human-friendly string.

Examples

iex> SimpleFeatureFlags.current_configuration_to_string()
"Current Deployment Environment: :test\nFeatures:\n - test_feature_1 is ON. Enabled in [:all]\n - test_feature_2 is ON. Enabled in :all\n - test_feature_3 is ON. Enabled in [:test]\n - test_feature_4 is ON. Enabled in [:staging, :test, :production]\n - test_feature_5 is OFF. Enabled in [:staging, :production]\n - test_feature_6 is OFF. Enabled in []\n"

enabled?(feature)

Is feature x enabled in the current deployment environment?

Examples

iex> SimpleFeatureFlags.enabled?(:test_feature_1)
true