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.



62
63
64
65
66
# File 'lib/ldpath/tests.rb', line 62

def initialize(delegate)
  @delegate = delegate

  super
end

Instance Attribute Details

#delegateObject (readonly)

Returns the value of attribute delegate.



60
61
62
# File 'lib/ldpath/tests.rb', line 60

def delegate
  @delegate
end

Instance Method Details

#evaluate(program, uri, context) ⇒ Object



68
69
70
# File 'lib/ldpath/tests.rb', line 68

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