Method: ShEx::Algebra::TripleConstraint#validate!
- Defined in:
- lib/shex/algebra/triple_constraint.rb
#validate! ⇒ Operator
expression must be a ShapeExpression
92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/shex/algebra/triple_constraint.rb', line 92 def validate! case expression when nil, ShapeExpression when RDF::Resource ref = schema.find(expression) ref.is_a?(ShapeExpression) || structure_error("#{json_type} must reference a ShapeExpression: #{ref}") else structure_error("#{json_type} must reference a ShapeExpression: #{ref}") end super end |