Class: Circuitdata::UuidChecker
- Inherits:
-
Object
- Object
- Circuitdata::UuidChecker
- Defined in:
- lib/circuitdata/json_schema.rb
Constant Summary collapse
- UUID_REGEX =
/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
Class Method Summary collapse
Class Method Details
.call(value) ⇒ Object
6 7 8 9 10 |
# File 'lib/circuitdata/json_schema.rb', line 6 def self.call(value) unless UUID_REGEX.match?(value) raise JSON::Schema::CustomFormatError.new("is not a uuid") end end |