Class: LaunchDarkly::Impl::Model::Rollout
- Inherits:
-
Object
- Object
- LaunchDarkly::Impl::Model::Rollout
- Defined in:
- lib/ldclient-rb/impl/model/feature_flag.rb
Overview
Instance Attribute Summary collapse
- #bucket_by ⇒ String|nil readonly
- #context_kind ⇒ String|nil readonly
- #is_experiment ⇒ Boolean readonly
- #kind ⇒ String|nil readonly
- #seed ⇒ Integer|nil readonly
- #variations ⇒ Array<WeightedVariation> readonly
Instance Method Summary collapse
-
#initialize(data, flag = nil, errors_out = nil, description = nil) ⇒ Rollout
constructor
A new instance of Rollout.
Constructor Details
#initialize(data, flag = nil, errors_out = nil, description = nil) ⇒ Rollout
Returns a new instance of Rollout.
212 213 214 215 216 217 218 219 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 212 def initialize(data, flag = nil, errors_out = nil, description = nil) @context_kind = data[:contextKind] @variations = (data[:variations] || []).map { |v| WeightedVariation.new(v, flag, errors_out, description) } @bucket_by = data[:bucketBy] @kind = data[:kind] @is_experiment = @kind == "experiment" @seed = data[:seed] end |
Instance Attribute Details
#bucket_by ⇒ String|nil (readonly)
226 227 228 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 226 def bucket_by @bucket_by end |
#context_kind ⇒ String|nil (readonly)
222 223 224 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 222 def context_kind @context_kind end |
#is_experiment ⇒ Boolean (readonly)
230 231 232 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 230 def is_experiment @is_experiment end |
#kind ⇒ String|nil (readonly)
228 229 230 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 228 def kind @kind end |
#seed ⇒ Integer|nil (readonly)
232 233 234 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 232 def seed @seed end |
#variations ⇒ Array<WeightedVariation> (readonly)
224 225 226 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 224 def variations @variations end |