Skip to content

Commit

Permalink
refactor: Remove unnecessary nil check on EvaluationDetail.reason (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 authored Jul 15, 2024
1 parent d85a373 commit 0295938
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ldclient-rb/events.rb
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,13 @@ def make_output_events(events, summary)
evaluation: {
key: event.key,
value: event.evaluation.value,
reason: event.evaluation.reason,
},
}

out[:evaluation][:version] = event.version unless event.version.nil?
out[:evaluation][:default] = event.default unless event.default.nil?
out[:evaluation][:variation] = event.evaluation.variation_index unless event.evaluation.variation_index.nil?
out[:evaluation][:reason] = event.evaluation.reason unless event.evaluation.reason.nil?
out[:samplingRatio] = event.sampling_ratio unless event.sampling_ratio.nil? || event.sampling_ratio == 1

measurements = []
Expand Down

0 comments on commit 0295938

Please sign in to comment.