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.



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

def initialize(delegate)
  @delegate = delegate
end

Instance Attribute Details

#delegateObject (readonly)

Returns the value of attribute delegate.



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

def delegate
  @delegate
end

Instance Method Details

#evaluate(program, uri, context) ⇒ Object



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

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