Class: FeatureState

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_sdk/feature_state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#strategyObject (readonly)

Returns the value of attribute strategy.



4
5
6
# File 'lib/ruby_sdk/feature_state.rb', line 4

def strategy
  @strategy
end

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/ruby_sdk/feature_state.rb', line 4

def value
  @value
end