class Ldpath::TapSelector

Attributes

identifier[R]
tap[R]

Public Class Methods

new(identifier, tap) click to toggle source
# File lib/ldpath/selectors.rb, line 214
def initialize(identifier, tap)
  @identifier = identifier
  @tap = tap
end

Public Instance Methods

evaluate(program, uris, context) { |x| ... } click to toggle source
# File lib/ldpath/selectors.rb, line 219
def evaluate(program, uris, context)
  return to_enum(:evaluate, program, uris, context) unless block_given?

  program.meta[identifier] = tap.evaluate(program, uris, context).map { |x| RDF::Literal.new(x.to_s).canonicalize.object }

  enum_wrap(uris).map do |uri|
    loading program, uri, context
    enum_flatten_one(evaluate_one(uri, context)).each do |x|
      yield x unless x.nil?
    end
  end
end
evaluate_one(uri, _context) click to toggle source
# File lib/ldpath/selectors.rb, line 232
def evaluate_one(uri, _context)
  uri
end