merge method
Create a new context by merging with another Per spec: overriding context targeting key takes precedence
Implementation
EvaluationContext merge(EvaluationContext other) {
return EvaluationContext(
targetingKey: other.targetingKey ?? targetingKey,
attributes: {
...parent?.attributes ?? {},
...attributes,
...other.attributes,
},
rules: [...rules, ...other.rules],
cacheDuration: cacheDuration,
);
}