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

Returns a new instance of WeightedVariation.

Since:

  • 5.5.0



196
197
198
199
200
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 196

def initialize(data)
  @variation = data[:variation]
  @weight = data[:weight]
  @untracked = !!data[:untracked]
end

Instance Attribute Details

#untrackedBoolean (readonly)

Returns:

  • (Boolean)

Since:

  • 5.5.0



207
208
209
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 207

def untracked
  @untracked
end

#variationInteger (readonly)

Returns:

  • (Integer)

Since:

  • 5.5.0



203
204
205
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 203

def variation
  @variation
end

#weightInteger (readonly)

Returns:

  • (Integer)

Since:

  • 5.5.0



205
206
207
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 205

def weight
  @weight
end