Class: JSONSkooma::Validators::Uuid
- Defined in:
- lib/json_skooma/validators/uuid.rb
Constant Summary collapse
- REGEXP =
/\A\h{8}-\h{4}-\h{4}-\h{4}-\h{12}\z/
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#call(data) ⇒ Object
8 9 10 11 12 |
# File 'lib/json_skooma/validators/uuid.rb', line 8 def call(data) return if REGEXP.match?(data) raise FormatError, "#{data} is not a valid UUID" end |