Module: Olyx::Guardrails::Notification::ViolationLabels

Defined in:
lib/olyx/guardrails/notification/violation_labels.rb

Overview

Derives stable machine-readable violation labels from a decision.

Class Method Summary collapse

Class Method Details

.call(result) ⇒ Object



12
13
14
15
# File 'lib/olyx/guardrails/notification/violation_labels.rb', line 12

def call(result)
  labels = Guardrails::ViolationLabels.call(result)
  labels.empty? ? ['policy_violation'] : labels
end