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



190
191
192
193
194
195
196
197
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 190

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



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

def bucket_by
  @bucket_by
end

#context_kindString|nil (readonly)

Returns:

  • (String|nil)

Since:

  • 5.5.0



200
201
202
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 200

def context_kind
  @context_kind
end

#is_experimentBoolean (readonly)

Returns:

  • (Boolean)

Since:

  • 5.5.0



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

def is_experiment
  @is_experiment
end

#kindString|nil (readonly)

Returns:

  • (String|nil)

Since:

  • 5.5.0



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

def kind
  @kind
end

#seedInteger|nil (readonly)

Returns:

  • (Integer|nil)

Since:

  • 5.5.0



210
211
212
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 210

def seed
  @seed
end

#variationsArray<WeightedVariation> (readonly)

Returns:

Since:

  • 5.5.0



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

def variations
  @variations
end