class Ldpath::LanguageTest

Attributes

lang[R]

Public Class Methods

new(lang) click to toggle source
# File lib/ldpath/tests.rb, line 25
def initialize(lang)
  @lang = lang
end

Public Instance Methods

evaluate(_program, uri, _context) click to toggle source
# File lib/ldpath/tests.rb, line 29
def evaluate(_program, uri, _context)
  return unless uri.literal?

  uri if (lang.to_s == "none" && !uri.has_language?) || uri.language.to_s == lang.to_s
end