Class: Ldpath::Selector

Inherits:
Object
  • Object
show all
Defined in:
lib/ldpath/selectors.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(program, uris, context) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/ldpath/selectors.rb', line 3

def evaluate(program, uris, context)
  return to_enum(:evaluate, program, uris, context) unless block_given?
  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

#loading(program, uri, context) ⇒ Object



13
14
15
# File 'lib/ldpath/selectors.rb', line 13

def loading(program, uri, context)
  program.loading uri, context
end