Class: ShEx::Algebra::Start

Inherits:
Operator::Unary show all
Defined in:
lib/shex/algebra/start.rb

Constant Summary collapse

NAME =
:start

Constants inherited from Operator::Unary

Operator::Unary::ARITY

Constants inherited from Operator

Operator::ARITY

Instance Attribute Summary

Attributes inherited from Operator

#operands, #options, #schema

Instance Method Summary collapse

Methods inherited from Operator::Unary

#initialize

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

#satisfies?(n) ⇒ Boolean

Returns ‘true` if satisfied.

Parameters:

  • n (RDF::Resource)

Returns:

  • (Boolean)

    ‘true` if satisfied

Raises:



10
11
12
13
14
15
16
17
18
# File 'lib/shex/algebra/start.rb', line 10

def satisfies?(n)
  status ""
  operands.first.satisfies?(n)
  status("satisfied")
  true
rescue ShEx::NotSatisfied => e
  not_satisfied e.message
  raise
end