Sha256: 08dd3762a98dc1cad18e8c1f743e494ac0f0ece55bda2d5190fef32e548302b9

Contents?: true

Size: 600 Bytes

Versions: 4

Compression:

Stored size: 600 Bytes

Contents

module RDF::N3::Algebra::Str
  # The subject string; the object is a regular expression in the perl, python style. It is true iff the string does NOT match the regexp.
  class NotMatches < Matches
    NAME = :strNotMatches
    URI = RDF::N3::Str.notMatches

    ##
    # @param  [RDF::Literal] text
    #   a simple literal
    # @param  [RDF::Literal] pattern
    #   a simple literal
    # @return [RDF::Literal::Boolean] `true` or `false`
    # @see https://www.w3.org/TR/xpath-functions/#regex-syntax
    def apply(text, pattern)
      RDF::Literal(super != RDF::Literal::TRUE)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rdf-n3-3.3.0 lib/rdf/n3/algebra/str/not_matches.rb
rdf-n3-3.2.1 lib/rdf/n3/algebra/str/not_matches.rb
rdf-n3-3.2.0 lib/rdf/n3/algebra/str/not_matches.rb
rdf-n3-3.1.2 lib/rdf/n3/algebra/str/not_matches.rb