-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Adjust migration variation and hook interaction (#264)
- Loading branch information
Showing
4 changed files
with
114 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module LaunchDarkly | ||
module Impl | ||
# | ||
# 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. | ||
# | ||
class EvaluationWithHookResult | ||
# | ||
# Return the evaluation detail that was generated as part of the evaluation. | ||
# | ||
# @return [LaunchDarkly::EvaluationDetail] | ||
# | ||
attr_reader :evaluation_detail | ||
|
||
# | ||
# All purpose container for additional return values from the wrapping method method | ||
# | ||
# @return [any] | ||
# | ||
attr_reader :results | ||
|
||
# | ||
# @param evaluation_detail [LaunchDarkly::EvaluationDetail] | ||
# @param results [any] | ||
# | ||
def initialize(evaluation_detail, results = nil) | ||
@evaluation_detail = evaluation_detail | ||
@results = results | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters