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.



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

def initialize(delegate)
  @delegate = delegate
end

Instance Attribute Details

#delegateObject (readonly)

Returns the value of attribute delegate.



47
48
49
# File 'lib/ldpath/tests.rb', line 47

def delegate
  @delegate
end

Instance Method Details

#evaluate(program, uri, context) ⇒ Object



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

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