Files
sure/lib/uuid_format.rb
ghost 0ab3b0b698 feat(exports): add rule operand references (#1726)
* feat(exports): add rule operand references

* fix(exports): preserve rule operand references

* refactor(exports): simplify rule operand branches

* refactor(validation): centralize UUID format checks

* fix(imports): preserve false rule operands
2026-05-12 21:29:29 +02:00

12 lines
217 B
Ruby

# frozen_string_literal: true
module UuidFormat
PATTERN = /\A[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\z/i.freeze
module_function
def valid?(value)
PATTERN.match?(value.to_s)
end
end