Class: LaunchDarkly::Impl::Model::Prerequisite

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

Returns a new instance of Prerequisite.

Since:

  • 5.5.0



121
122
123
124
125
126
127
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 121

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

#dataHash (readonly)

Returns:

  • (Hash)

Since:

  • 5.5.0



130
131
132
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 130

def data
  @data
end

#failure_resultLaunchDarkly::EvaluationDetail (readonly)

Returns:

Since:

  • 5.5.0



136
137
138
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 136

def failure_result
  @failure_result
end

#keyString (readonly)

Returns:

  • (String)

Since:

  • 5.5.0



132
133
134
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 132

def key
  @key
end

#variationInteger (readonly)

Returns:

  • (Integer)

Since:

  • 5.5.0



134
135
136
# File 'lib/ldclient-rb/impl/model/feature_flag.rb', line 134

def variation
  @variation
end