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.
237 238 239 240 241 242 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 237 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)
249 250 251 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 249 def untracked @untracked end |
#variation ⇒ Integer (readonly)
245 246 247 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 245 def variation @variation end |
#weight ⇒ Integer (readonly)
247 248 249 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 247 def weight @weight end |