Class: Ldpath::OrTest
- Inherits:
-
TestSelector
- Object
- Selector
- TestSelector
- Ldpath::OrTest
- 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) ⇒ OrTest
constructor
A new instance of OrTest.
Methods inherited from Selector
Constructor Details
#initialize(left, right) ⇒ OrTest
Returns a new instance of OrTest.
76 77 78 79 80 81 |
# File 'lib/ldpath/tests.rb', line 76 def initialize(left, right) @left = left @right = right super end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
74 75 76 |
# File 'lib/ldpath/tests.rb', line 74 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
74 75 76 |
# File 'lib/ldpath/tests.rb', line 74 def right @right end |
Instance Method Details
#evaluate(program, uri, context) ⇒ Object
83 84 85 |
# File 'lib/ldpath/tests.rb', line 83 def evaluate(program, uri, context) left.evaluate(program, uri, context).any? || right.evaluate(program, uri, context).any? end |