lib/shex/algebra/satisfiable.rb in shex-0.2.0 vs lib/shex/algebra/satisfiable.rb in shex-0.3.0
- old
+ new
@@ -4,21 +4,17 @@
# Implements `satisfies?` and `not_satisfies?`
module Satisfiable
##
# Satisfies method
# @param [RDF::Resource] focus
- # @return [TripleExpression] with `matched` and `satisfied` accessors for matched triples and sub-expressions
+ # @param [Integer] depth for logging
+ # @param [Hash{Symbol => Object}] options
+ # Other, operand-specific options
+ # @return [Operator] with `matched` and `satisfied` accessors for matched triples and sub-expressions
# @raise [ShEx::NotMatched] with `expression` accessor to access `matched` and `unmatched` statements along with `satisfied` and `unsatisfied` operations.
# @see [https://shexspec.github.io/spec/#shape-expression-semantics]
- def satisfies?(focus)
+ def satisfies?(focus, depth: 0, **options)
raise NotImplementedError, "#satisfies? Not implemented in #{self.class}"
- end
-
- ##
- # Included TripleExpressions
- # @return [Array<TripleExpressions>]
- def triple_expressions
- operands.select {|o| o.is_a?(Satisfiable)}.map(&:triple_expressions).flatten.uniq
end
# This operator includes Satisfiable
def satisfiable?; true; end
end