Class: LaunchDarkly::Impl::Model::Rollout

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/impl/model/feature_flag.rb

Overview

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, flag = nil, errors_out = nil, description = nil) ⇒ Rollout

Returns a new instance of Rollout.

Since:

  • 5.5.0



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_byString|nil (readonly)

Returns:

  • (String|nil)

Since:

  • 5.5.0



226
227
228
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 226

def bucket_by
  @bucket_by
end

#context_kindString|nil (readonly)

Returns:

  • (String|nil)

Since:

  • 5.5.0



222
223
224
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 222

def context_kind
  @context_kind
end

#is_experimentBoolean (readonly)

Returns:

  • (Boolean)

Since:

  • 5.5.0



230
231
232
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 230

def is_experiment
  @is_experiment
end

#kindString|nil (readonly)

Returns:

  • (String|nil)

Since:

  • 5.5.0



228
229
230
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 228

def kind
  @kind
end

#seedInteger|nil (readonly)

Returns:

  • (Integer|nil)

Since:

  • 5.5.0



232
233
234
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 232

def seed
  @seed
end

#variationsArray<WeightedVariation> (readonly)

Returns:

Since:

  • 5.5.0



224
225
226
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 224

def variations
  @variations
end