Class: JSONSkooma::Validators::IriReference
- Defined in:
- lib/json_skooma/validators/iri_reference.rb
Constant Summary collapse
- REGEX =
/\A#{Iri::IRI_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/iri_reference.rb', line 8 def call(data) return if REGEX.match?(data.value) raise FormatError, "#{data} is not a valid IRI reference" end |