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



213
214
215
216
217
218
219
220
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 213

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



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

def bucket_by
  @bucket_by
end

#context_kindString|nil (readonly)

Returns:

  • (String|nil)

Since:

  • 5.5.0



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

def context_kind
  @context_kind
end

#is_experimentBoolean (readonly)

Returns:

  • (Boolean)

Since:

  • 5.5.0



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

def is_experiment
  @is_experiment
end

#kindString|nil (readonly)

Returns:

  • (String|nil)

Since:

  • 5.5.0



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

def kind
  @kind
end

#seedInteger|nil (readonly)

Returns:

  • (Integer|nil)

Since:

  • 5.5.0



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

def seed
  @seed
end

#variationsArray<WeightedVariation> (readonly)

Returns:

Since:

  • 5.5.0



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

def variations
  @variations
end