Class: JSONSkooma::Validators::UriReference
- Defined in:
- lib/json_skooma/validators/uri_reference.rb
Constant Summary collapse
- REGEX =
/\A#{Uri::URI_REFERENCE}\z/.freeze
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#call(data) ⇒ Object
8 9 10 11 12 |
# File 'lib/json_skooma/validators/uri_reference.rb', line 8 def call(data) return if REGEX.match?(data.value) raise FormatError, "#{data} is not a valid URI reference" end |