Module: Canql::Nodes::TestResult::WithCondition
- Defined in:
- lib/canql/nodes/test_result.rb
Instance Method Summary collapse
- #existence_filter ⇒ Object
- #test_result_type ⇒ Object
- #test_result_type_filter ⇒ Object
- #to_test_result ⇒ Object
Instance Method Details
#existence_filter ⇒ Object
17 18 19 |
# File 'lib/canql/nodes/test_result.rb', line 17 def existence_filter { Canql::EQUALS => existence_modifier.text_value.strip != 'no' } end |
#test_result_type ⇒ Object
7 8 9 |
# File 'lib/canql/nodes/test_result.rb', line 7 def test_result_type natal_period.text_value.strip end |
#test_result_type_filter ⇒ Object
21 22 23 |
# File 'lib/canql/nodes/test_result.rb', line 21 def test_result_type_filter { Canql::EQUALS => test_result_type } end |
#to_test_result ⇒ Object
11 12 13 14 15 |
# File 'lib/canql/nodes/test_result.rb', line 11 def to_test_result test_result_hash = { 'exists' => existence_filter } test_result_hash['type'] = test_result_type_filter if test_result_type.present? test_result_hash end |