Sha256: 89a870832c71afc2d3ac647e230bc74d0e5be7b0c912ad8fc13bea83cfb84c39
Contents?: true
Size: 743 Bytes
Versions: 12
Compression:
Stored size: 743 Bytes
Contents
module ShEx::Algebra ## class External < Operator include ShapeExpression NAME = :external # # S is a ShapeRef and the Schema's shapes maps reference to a shape expression se2 and satisfies(n, se2, G, m). def satisfies?(focus, depth: 0) extern_shape = nil # Find the id for this external not_satisfied("Can't find id for this extern", depth: depth) unless id schema.external_schemas.each do |schema| extern_shape ||= schema.shapes.detect {|s| s.id == id} end not_satisfied("External not configured for this shape", depth: depth) unless extern_shape extern_shape.satisfies?(focus, depth: depth + 1) end def json_type "ShapeExternal" end end end
Version data entries
12 entries across 12 versions & 1 rubygems