Class: LaunchDarkly::Impl::Model::WeightedVariation
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::WeightedVariation
- Defined in:
- lib/ldclient-rb/impl/model/feature_flag.rb
Overview
Instance Attribute Summary collapse
- #untracked ⇒ Boolean readonly
- #variation ⇒ Integer readonly
- #weight ⇒ Integer readonly
Instance Method Summary collapse
-
#initialize(data, flag = nil, errors_out = nil, description = nil) ⇒ WeightedVariation
constructor
A new instance of WeightedVariation.
Constructor Details
#initialize(data, flag = nil, errors_out = nil, description = nil) ⇒ WeightedVariation
Returns a new instance of WeightedVariation.
236 237 238 239 240 241 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 236 def initialize(data, flag = nil, errors_out = nil, description = nil) @variation = data[:variation] @weight = data[:weight] @untracked = !!data[:untracked] check_variation_range(flag, errors_out, @variation, description) end |
Instance Attribute Details
#untracked ⇒ Boolean (readonly)
248 249 250 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 248 def untracked @untracked end |
#variation ⇒ Integer (readonly)
244 245 246 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 244 def variation @variation end |
#weight ⇒ Integer (readonly)
246 247 248 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 246 def weight @weight end |