Class: LaunchDarkly::Impl::EvaluationWithHookResult

Inherits:
Object
  • Object
show all
Defined in:
lib/ldclient-rb/impl/evaluation_with_hook_result.rb

Overview

Simple helper class for returning formatted data.

The variation methods make use of the new hook support. Those methods all need to return an evaluation detail, and some other unstructured bit of data.

Since:

  • 5.5.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(evaluation_detail, results = nil) ⇒ EvaluationWithHookResult

Returns a new instance of EvaluationWithHookResult.

Parameters:

Since:

  • 5.5.0



28
29
30
31
# File 'lib/ldclient-rb/impl/evaluation_with_hook_result.rb', line 28

def initialize(evaluation_detail, results = nil)
  @evaluation_detail = evaluation_detail
  @results = results
end

Instance Attribute Details

#evaluation_detailLaunchDarkly::EvaluationDetail (readonly)

Return the evaluation detail that was generated as part of the evaluation.

Returns:

Since:

  • 5.5.0



15
16
17
# File 'lib/ldclient-rb/impl/evaluation_with_hook_result.rb', line 15

def evaluation_detail
  @evaluation_detail
end

#resultsany (readonly)

All purpose container for additional return values from the wrapping method

Returns:

  • (any)

Since:

  • 5.5.0



22
23
24
# File 'lib/ldclient-rb/impl/evaluation_with_hook_result.rb', line 22

def results
  @results
end