Module: Olyx::Guardrails::PolicyComponents::Name
- Defined in:
- lib/olyx/guardrails/policy/name.rb
Overview
Validates and freezes an operator-facing policy identifier.
Class Method Summary collapse
Class Method Details
.call(value) ⇒ Object
10 11 12 13 14 |
# File 'lib/olyx/guardrails/policy/name.rb', line 10 def call(value) return value.dup.freeze if valid?(value) raise ArgumentError, 'policy name must be a String of 1..100 characters' end |