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

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

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Rollout.

Since:

  • 5.5.0



246
247
248
249
250
251
252
253
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 246

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)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String|nil)

Since:

  • 5.5.0



260
261
262
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 260

def bucket_by
  @bucket_by
end

#context_kind ⇒ String|nil (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String|nil)

Since:

  • 5.5.0



256
257
258
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 256

def context_kind
  @context_kind
end

#is_experiment ⇒ Boolean (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

Since:

  • 5.5.0



264
265
266
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 264

def is_experiment
  @is_experiment
end

#kind ⇒ String|nil (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (String|nil)

Since:

  • 5.5.0



262
263
264
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 262

def kind
  @kind
end

#seed ⇒ Integer|nil (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Integer|nil)

Since:

  • 5.5.0



266
267
268
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 266

def seed
  @seed
end

#variations ⇒ Array<WeightedVariation> (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

Since:

  • 5.5.0



258
259
260
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 258

def variations
  @variations
end