Class: RDF::Literal
- Inherits:
-
Object
- Object
- RDF::Literal
- Defined in:
- lib/json/ld/extensions.rb
Instance Method Summary collapse
-
#valid_extended? ⇒ Boolean
Validate extended RDF.
Instance Method Details
#valid_extended? ⇒ Boolean
Validate extended RDF
37 38 39 40 41 |
# File 'lib/json/ld/extensions.rb', line 37 def valid_extended? return false if language? && language.to_s !~ /^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/ return false if datatype? && datatype.invalid? value.is_a?(String) end |