Class: Yoti::Sandbox::DocScan::Request::RecommendationBuilder
- Inherits:
-
Object
- Object
- Yoti::Sandbox::DocScan::Request::RecommendationBuilder
- Defined in:
- lib/yoti_sandbox/doc_scan/request/check/report/recommendation.rb
Instance Method Summary collapse
- #build ⇒ Recommendation
- #with_reason(reason) ⇒ self
- #with_recovery_suggestion(recovery_suggestion) ⇒ self
- #with_value(value) ⇒ self
Instance Method Details
#build ⇒ Recommendation
81 82 83 |
# File 'lib/yoti_sandbox/doc_scan/request/check/report/recommendation.rb', line 81 def build Recommendation.new(@value, @reason, @recovery_suggestion) end |
#with_reason(reason) ⇒ self
61 62 63 64 65 |
# File 'lib/yoti_sandbox/doc_scan/request/check/report/recommendation.rb', line 61 def with_reason(reason) Validation.assert_is_a(String, reason, 'reason') @reason = reason self end |
#with_recovery_suggestion(recovery_suggestion) ⇒ self
72 73 74 75 76 |
# File 'lib/yoti_sandbox/doc_scan/request/check/report/recommendation.rb', line 72 def with_recovery_suggestion(recovery_suggestion) Validation.assert_is_a(String, recovery_suggestion, 'recovery_suggestion') @recovery_suggestion = recovery_suggestion self end |
#with_value(value) ⇒ self
50 51 52 53 54 |
# File 'lib/yoti_sandbox/doc_scan/request/check/report/recommendation.rb', line 50 def with_value(value) Validation.assert_is_a(String, value, 'value') @value = value self end |