Class: LaunchDarkly::Impl::Model::WeightedVariation

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) ⇒ WeightedVariation

Returns a new instance of WeightedVariation.

Since:

  • 5.5.0



236
237
238
239
240
241
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 236

def initialize(data, flag = nil, errors_out = nil, description = nil)
  @variation = data[:variation]
  @weight = data[:weight]
  @untracked = !!data[:untracked]
  check_variation_range(flag, errors_out, @variation, description)
end

Instance Attribute Details

#untrackedBoolean (readonly)

Returns:

  • (Boolean)

Since:

  • 5.5.0



248
249
250
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 248

def untracked
  @untracked
end

#variationInteger (readonly)

Returns:

  • (Integer)

Since:

  • 5.5.0



244
245
246
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 244

def variation
  @variation
end

#weightInteger (readonly)

Returns:

  • (Integer)

Since:

  • 5.5.0



246
247
248
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 246

def weight
  @weight
end