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.
190 191 192 193 194 195 196 197 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 190 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)
204 205 206 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 204 def bucket_by @bucket_by end |
#context_kind ⇒ String|nil (readonly)
200 201 202 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 200 def context_kind @context_kind end |
#is_experiment ⇒ Boolean (readonly)
208 209 210 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 208 def is_experiment @is_experiment end |
#kind ⇒ String|nil (readonly)
206 207 208 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 206 def kind @kind end |
#seed ⇒ Integer|nil (readonly)
210 211 212 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 210 def seed @seed end |
#variations ⇒ Array<WeightedVariation> (readonly)
202 203 204 |
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 202 def variations @variations end |