Class: Kameleoon::Types::FeatureFlag
- Inherits:
-
Object
- Object
- Kameleoon::Types::FeatureFlag
- Defined in:
- lib/kameleoon/types/feature_flag.rb
Overview
FeatureFlag
Instance Attribute Summary collapse
-
#default_variation_key ⇒ Object
readonly
Returns the value of attribute default_variation_key.
-
#environment_enabled ⇒ Object
readonly
Returns the value of attribute environment_enabled.
-
#rules ⇒ Object
readonly
Returns the value of attribute rules.
-
#variations ⇒ Object
readonly
Returns the value of attribute variations.
Instance Method Summary collapse
- #default_variation ⇒ Object
-
#initialize(variations, environment_enabled, rules, default_variation_key) ⇒ FeatureFlag
constructor
private
A new instance of FeatureFlag.
- #to_s ⇒ Object
Constructor Details
#initialize(variations, environment_enabled, rules, default_variation_key) ⇒ FeatureFlag
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of FeatureFlag.
10 11 12 13 14 15 |
# File 'lib/kameleoon/types/feature_flag.rb', line 10 def initialize(variations, environment_enabled, rules, default_variation_key) @variations = variations @environment_enabled = environment_enabled @rules = rules @default_variation_key = default_variation_key end |
Instance Attribute Details
#default_variation_key ⇒ Object (readonly)
Returns the value of attribute default_variation_key.
7 8 9 |
# File 'lib/kameleoon/types/feature_flag.rb', line 7 def default_variation_key @default_variation_key end |
#environment_enabled ⇒ Object (readonly)
Returns the value of attribute environment_enabled.
7 8 9 |
# File 'lib/kameleoon/types/feature_flag.rb', line 7 def environment_enabled @environment_enabled end |
#rules ⇒ Object (readonly)
Returns the value of attribute rules.
7 8 9 |
# File 'lib/kameleoon/types/feature_flag.rb', line 7 def rules @rules end |
#variations ⇒ Object (readonly)
Returns the value of attribute variations.
7 8 9 |
# File 'lib/kameleoon/types/feature_flag.rb', line 7 def variations @variations end |
Instance Method Details
#default_variation ⇒ Object
17 18 19 |
# File 'lib/kameleoon/types/feature_flag.rb', line 17 def default_variation @variations[@default_variation_key] end |
#to_s ⇒ Object
21 22 23 |
# File 'lib/kameleoon/types/feature_flag.rb', line 21 def to_s "FeatureFlag{variations:#{@variations},environment_enabled:#{@environment_enabled},rules:#{@rules},default_variation_key:#{@default_variation_key}}" end |