Class: ShEx::Algebra::Stem
- Inherits:
-
Operator::Unary
- Object
- Operator
- Operator::Unary
- ShEx::Algebra::Stem
- Defined in:
- lib/shex/algebra/stem.rb
Constant Summary collapse
- NAME =
:stem
Constants inherited from Operator::Unary
Constants inherited from Operator
Instance Attribute Summary
Attributes inherited from Operator
Instance Method Summary collapse
-
#match?(value) ⇒ Boolean
For a node n and constraint value v, nodeSatisfies(n, v) if n matches some valueSetValue vsv in v.
Methods inherited from Operator::Unary
Methods inherited from Operator
#closed?, #each_descendant, #eql?, #first_ancestor, #initialize, #inspect, #not_matched, #not_satisfied, #operand, #parent, #parent=, #satisfiable?, #semact?, #semantic_actions, #status, #structure_error, #to_sxp, #to_sxp_bin, #triple_expression?, #validate!
Constructor Details
This class inherits a constructor from ShEx::Algebra::Operator::Unary
Instance Method Details
#match?(value) ⇒ Boolean
For a node n and constraint value v, nodeSatisfies(n, v) if n matches some valueSetValue vsv in v. A term matches a valueSetValue if:
-
vsv is a Stem with stem st and nodeIn(n, st).
10 11 12 13 14 15 16 17 18 |
# File 'lib/shex/algebra/stem.rb', line 10 def match?(value) if value.start_with?(operands.first) status "matched #{value}" true else status "not matched #{value}" false end end |