Class: LaunchDarkly::Impl::Model::Prerequisite 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) ⇒ Prerequisite

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 Prerequisite.

Since:

  • 5.5.0



155
156
157
158
159
160
161
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 155

def initialize(data, flag)
  @data = data
  @key = data[:key]
  @variation = data[:variation]
  @failure_result = EvaluatorHelpers.evaluation_detail_for_off_variation(flag,
    EvaluationReason::prerequisite_failed(@key))
end

Instance Attribute Details

#data ⇒ Hash (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:

  • (Hash)

Since:

  • 5.5.0



164
165
166
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 164

def data
  @data
end

#failure_result ⇒ LaunchDarkly::EvaluationDetail (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



170
171
172
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 170

def failure_result
  @failure_result
end

#key ⇒ String (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)

Since:

  • 5.5.0



166
167
168
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 166

def key
  @key
end

#variation ⇒ Integer (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)

Since:

  • 5.5.0



168
169
170
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 168

def variation
  @variation
end