Class: Featureflip::Models::FlagConfiguration
- Inherits:
-
Struct
- Object
- Struct
- Featureflip::Models::FlagConfiguration
- Defined in:
- lib/featureflip/models/flag.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#fallthrough ⇒ Object
Returns the value of attribute fallthrough.
-
#key ⇒ Object
Returns the value of attribute key.
-
#off_variation ⇒ Object
Returns the value of attribute off_variation.
-
#prerequisites ⇒ Object
Returns the value of attribute prerequisites.
-
#rules ⇒ Object
Returns the value of attribute rules.
-
#type ⇒ Object
Returns the value of attribute type.
-
#variations ⇒ Object
Returns the value of attribute variations.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #get_variation(key) ⇒ Object
-
#initialize(key:, version:, type:, enabled:, variations:, rules:, fallthrough:, off_variation:, prerequisites: []) ⇒ FlagConfiguration
constructor
A new instance of FlagConfiguration.
Constructor Details
#initialize(key:, version:, type:, enabled:, variations:, rules:, fallthrough:, off_variation:, prerequisites: []) ⇒ FlagConfiguration
Returns a new instance of FlagConfiguration.
37 38 39 |
# File 'lib/featureflip/models/flag.rb', line 37 def initialize(key:, version:, type:, enabled:, variations:, rules:, fallthrough:, off_variation:, prerequisites: []) super end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def enabled @enabled end |
#fallthrough ⇒ Object
Returns the value of attribute fallthrough
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def fallthrough @fallthrough end |
#key ⇒ Object
Returns the value of attribute key
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def key @key end |
#off_variation ⇒ Object
Returns the value of attribute off_variation
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def off_variation @off_variation end |
#prerequisites ⇒ Object
Returns the value of attribute prerequisites
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def prerequisites @prerequisites end |
#rules ⇒ Object
Returns the value of attribute rules
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def rules @rules end |
#type ⇒ Object
Returns the value of attribute type
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def type @type end |
#variations ⇒ Object
Returns the value of attribute variations
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def variations @variations end |
#version ⇒ Object
Returns the value of attribute version
33 34 35 |
# File 'lib/featureflip/models/flag.rb', line 33 def version @version end |
Instance Method Details
#get_variation(key) ⇒ Object
41 42 43 44 |
# File 'lib/featureflip/models/flag.rb', line 41 def get_variation(key) @variations_by_key ||= variations.each_with_object({}) { |v, h| h[v.key] = v } @variations_by_key[key] end |