Class: JSONSkooma::Validators::Regex

Inherits:
Base
  • Object
show all
Defined in:
lib/json_skooma/validators/regex.rb

Instance Method Summary collapse

Methods inherited from Base

assert?, call, inherited

Instance Method Details

#call(data) ⇒ Object



8
9
10
11
12
# File 'lib/json_skooma/validators/regex.rb', line 8

def call(data)
  Regexp::Parser.parse(data)
rescue Regexp::Scanner::ScannerError => e
  raise FormatError, e.message
end