Method: RDF::Vocabulary.each_statement

Defined in:
lib/rdf/vocabulary.rb

.each_statement {|| ... } ⇒ Object

Enumerate each statement constructed from the defined vocabulary terms

If a property value is known to be a URI, or expands to a URI, the ‘object` is a URI, otherwise, it will be a Literal.

Yields:

  • statement

Yield Parameters:



468
469
470
471
472
473
474
475
# File 'lib/rdf/vocabulary.rb', line 468

def each_statement(&block)
  props.each do |name, subject|
    subject.each_statement(&block)
  end

  # Also include the ontology, if it's not also a property
  @ontology.each_statement(&block) if self.ontology && self.ontology != self
end