Class: Yoti::Sandbox::DocScan::Request::SupplementaryDocumentTextDataCheckBuilder
- Inherits:
-
DocumentCheckBuilder
- Object
- CheckBuilder
- DocumentCheckBuilder
- Yoti::Sandbox::DocScan::Request::SupplementaryDocumentTextDataCheckBuilder
- Defined in:
- lib/yoti_sandbox/doc_scan/request/check/supplementary_document_text_data_check.rb
Instance Method Summary collapse
- #build ⇒ SupplementaryDocumentTextDataCheck
- #with_document_field(key, value) ⇒ self
- #with_document_fields(document_fields) ⇒ self
Methods inherited from DocumentCheckBuilder
#initialize, #with_document_filter
Methods inherited from CheckBuilder
#initialize, #with_breakdown, #with_breakdowns, #with_recommendation
Constructor Details
This class inherits a constructor from Yoti::Sandbox::DocScan::Request::DocumentCheckBuilder
Instance Method Details
#build ⇒ SupplementaryDocumentTextDataCheck
69 70 71 72 73 |
# File 'lib/yoti_sandbox/doc_scan/request/check/supplementary_document_text_data_check.rb', line 69 def build report = CheckReport.new(@recommendation, @breakdowns) result = SupplementaryDocumentTextDataCheckResult.new(report, @document_fields) SupplementaryDocumentTextDataCheck.new(result, @document_filter) end |
#with_document_field(key, value) ⇒ self
47 48 49 50 51 52 53 |
# File 'lib/yoti_sandbox/doc_scan/request/check/supplementary_document_text_data_check.rb', line 47 def with_document_field(key, value) Validation.assert_is_a(String, key, 'key') Validation.assert_respond_to(:to_json, value, 'value') @document_fields ||= {} @document_fields[key] = value self end |
#with_document_fields(document_fields) ⇒ self
60 61 62 63 64 |
# File 'lib/yoti_sandbox/doc_scan/request/check/supplementary_document_text_data_check.rb', line 60 def with_document_fields(document_fields) Validation.assert_is_a(Hash, document_fields, 'document_fields') @document_fields = document_fields self end |