Class: Vangrail::Engine::Screening
- Inherits:
-
Struct
- Object
- Struct
- Vangrail::Engine::Screening
- Defined in:
- lib/vangrail/engine.rb
Overview
What screen returns. certain means what it means on a Result: false says
a rail did not reach a decision about some document, so "nothing was
rejected" is not evidence that nothing was wrong.
Instance Attribute Summary collapse
-
#certain ⇒ Object
Returns the value of attribute certain.
-
#kept ⇒ Object
Returns the value of attribute kept.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#rejected ⇒ Object
Returns the value of attribute rejected.
Instance Method Summary collapse
Instance Attribute Details
#certain ⇒ Object
Returns the value of attribute certain
76 77 78 |
# File 'lib/vangrail/engine.rb', line 76 def certain @certain end |
#kept ⇒ Object
Returns the value of attribute kept
76 77 78 |
# File 'lib/vangrail/engine.rb', line 76 def kept @kept end |
#reason ⇒ Object
Returns the value of attribute reason
76 77 78 |
# File 'lib/vangrail/engine.rb', line 76 def reason @reason end |
#rejected ⇒ Object
Returns the value of attribute rejected
76 77 78 |
# File 'lib/vangrail/engine.rb', line 76 def rejected @rejected end |
Instance Method Details
#certain? ⇒ Boolean
77 78 79 |
# File 'lib/vangrail/engine.rb', line 77 def certain? certain end |
#rejected? ⇒ Boolean
81 82 83 |
# File 'lib/vangrail/engine.rb', line 81 def rejected? !rejected.empty? end |
#to_h ⇒ Object
85 86 87 88 89 90 91 92 |
# File 'lib/vangrail/engine.rb', line 85 def to_h { 'kept' => kept.size, 'rejected' => rejected.map { |r| r[:result].to_h }, 'certain' => certain?, 'reason' => reason }.compact end |