Class: Ldpath::NotTest

Inherits:
TestSelector show all
Defined in:
lib/ldpath/tests.rb

Instance Attribute Summary collapse

Attributes inherited from TestSelector

#test

Instance Method Summary collapse

Methods inherited from Selector

#loading

Constructor Details

#initialize(delegate) ⇒ NotTest

Returns a new instance of NotTest.



52
53
54
# File 'lib/ldpath/tests.rb', line 52

def initialize(delegate)
  @delegate = delegate
end

Instance Attribute Details

#delegateObject (readonly)

Returns the value of attribute delegate.



50
51
52
# File 'lib/ldpath/tests.rb', line 50

def delegate
  @delegate
end

Instance Method Details

#evaluate(program, uri, context) ⇒ Object



56
57
58
# File 'lib/ldpath/tests.rb', line 56

def evaluate(program, uri, context)
  !enum_wrap(delegate.evaluate(program, uri, context)).any? { |x| x }
end