Module: RDF::Term
- Included in:
- N3::Algebra::Formula, N3::List
- Defined in:
- lib/rdf/n3/refinements.rb,
lib/rdf/n3/extensions.rb
Overview
Refinements on RDF::Node
Instance Method Summary collapse
-
#as_datetime ⇒ RDF::Literal::DateTime
Parse the value as a dateTime literal, or return now.
-
#as_number ⇒ RDF::Literal::Numeric
Parse the value as a numeric literal, or return 0.
-
#evaluate(bindings, formulae:, **options) ⇒ RDF::Node, RDF::N3::Algebra::Formula
Blank node may refer to a formula.
-
#sameTerm?(other) ⇒ Boolean
Is this the same term? Like
#eql?
, but no variable matching.
Instance Method Details
#as_datetime ⇒ RDF::Literal::DateTime
Parse the value as a dateTime literal, or return now.
78 79 80 |
# File 'lib/rdf/n3/extensions.rb', line 78 def as_datetime RDF::Literal::DateTime.new(DateTime.now) end |
#as_number ⇒ RDF::Literal::Numeric
Parse the value as a numeric literal, or return 0.
70 71 72 |
# File 'lib/rdf/n3/extensions.rb', line 70 def as_number RDF::Literal(0) end |
#evaluate(bindings, formulae:, **options) ⇒ RDF::Node, RDF::N3::Algebra::Formula
Blank node may refer to a formula.
12 |
# File 'lib/rdf/n3/refinements.rb', line 12 def evaluate(bindings, formulae: nil, **); end |
#sameTerm?(other) ⇒ Boolean
Is this the same term? Like #eql?
, but no variable matching
62 63 64 |
# File 'lib/rdf/n3/extensions.rb', line 62 def sameTerm?(other) eql?(other) end |