Class: Ldpath::IsTest

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

Instance Attribute Summary collapse

Attributes inherited from TestSelector

#delegate, #test

Instance Method Summary collapse

Methods inherited from Selector

#loading

Constructor Details

#initialize(left, right) ⇒ IsTest

Returns a new instance of IsTest.



107
108
109
110
111
112
# File 'lib/ldpath/tests.rb', line 107

def initialize(left, right)
  @left = left
  @right = right

  super
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



105
106
107
# File 'lib/ldpath/tests.rb', line 105

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



105
106
107
# File 'lib/ldpath/tests.rb', line 105

def right
  @right
end

Instance Method Details

#evaluate(program, uri, context) ⇒ Object



114
115
116
# File 'lib/ldpath/tests.rb', line 114

def evaluate(program, uri, context)
  left.evaluate(program, uri, context).include?(right)
end