Module: Smplkit::Audit::TransformType
- Defined in:
- lib/smplkit/audit/models.rb
Overview
Engine that evaluates a forwarder’s transform template (ADR-047 §2.12). Only JSONATA is supported today; the enum exists so the field is typed instead of accepting any string, and so additional engines can be added without breaking the public surface.
Constant Summary collapse
- JSONATA =
"JSONATA"- VALUES =
[JSONATA].freeze
Class Method Summary collapse
-
.coerce(value) ⇒ String?
Validate and normalize an input to a wire-format string.
Class Method Details
.coerce(value) ⇒ String?
Validate and normalize an input to a wire-format string.
131 132 133 134 135 136 137 138 139 |
# File 'lib/smplkit/audit/models.rb', line 131 def self.coerce(value) return nil if value.nil? s = value.to_s return s if VALUES.include?(s) raise ArgumentError, "Unknown TransformType #{value.inspect}; expected one of #{VALUES.inspect}" end |