Method: ShEx::Algebra::Shape#validate!
- Defined in:
- lib/shex/algebra/shape.rb
#validate! ⇒ Operator
expression must be a TripleExpression
113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/shex/algebra/shape.rb', line 113 def validate! case expression when nil, TripleExpression when RDF::Resource ref = schema.find(expression) ref.is_a?(TripleExpression) || structure_error("#{json_type} must reference a TripleExpression: #{ref}") else structure_error("#{json_type} must reference a TripleExpression: #{ref}") end super end |