Class: Ldpath::AndTest
- Inherits:
-
TestSelector
- Object
- Selector
- TestSelector
- Ldpath::AndTest
- Defined in:
- lib/ldpath/tests.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Attributes inherited from TestSelector
Instance Method Summary collapse
- #evaluate(program, uri, context) ⇒ Object
-
#initialize(left, right) ⇒ AndTest
constructor
A new instance of AndTest.
Methods inherited from Selector
Constructor Details
#initialize(left, right) ⇒ AndTest
Returns a new instance of AndTest.
77 78 79 80 |
# File 'lib/ldpath/tests.rb', line 77 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
75 76 77 |
# File 'lib/ldpath/tests.rb', line 75 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
75 76 77 |
# File 'lib/ldpath/tests.rb', line 75 def right @right end |
Instance Method Details
#evaluate(program, uri, context) ⇒ Object
82 83 84 85 |
# File 'lib/ldpath/tests.rb', line 82 def evaluate(program, uri, context) left.evaluate(program, uri, context).any? && right.evaluate(program, uri, context).any? end |