Class: FeatureState
- Inherits:
-
Object
- Object
- FeatureState
- Defined in:
- lib/ruby_sdk/feature_state.rb
Instance Attribute Summary collapse
-
#strategy ⇒ Object
readonly
Returns the value of attribute strategy.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(feature_state_object) ⇒ FeatureState
constructor
A new instance of FeatureState.
Constructor Details
#initialize(feature_state_object) ⇒ FeatureState
Returns a new instance of FeatureState.
5 6 7 8 9 10 11 |
# File 'lib/ruby_sdk/feature_state.rb', line 5 def initialize(feature_state_object) @title = feature_state_object[:title], @value = feature_state_object[:value], if feature_state_object[:strategy] @strategy = Strategy.new(feature_state_object[:strategy][:percentage]) end end |
Instance Attribute Details
#strategy ⇒ Object (readonly)
Returns the value of attribute strategy.
4 5 6 |
# File 'lib/ruby_sdk/feature_state.rb', line 4 def strategy @strategy end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/ruby_sdk/feature_state.rb', line 4 def value @value end |