Class: Mindee::V2::Product::Classification::ClassificationClassifier
- Inherits:
-
Object
- Object
- Mindee::V2::Product::Classification::ClassificationClassifier
- Defined in:
- lib/mindee/v2/product/classification/classification_classifier.rb
Overview
Classification of document type from the source file.
Instance Attribute Summary collapse
-
#document_type ⇒ String
readonly
The document type, as identified on given classification values.
-
#extraction_response ⇒ Object
readonly
Returns the value of attribute extraction_response.
Instance Method Summary collapse
-
#initialize(server_response) ⇒ ClassificationClassifier
constructor
A new instance of ClassificationClassifier.
-
#to_s ⇒ String
String representation.
Constructor Details
#initialize(server_response) ⇒ ClassificationClassifier
Returns a new instance of ClassificationClassifier.
14 15 16 17 18 19 20 21 |
# File 'lib/mindee/v2/product/classification/classification_classifier.rb', line 14 def initialize(server_response) @document_type = server_response['document_type'] # rubocop:disable Style/GuardClause unless server_response['extraction_response'].nil? @extraction_response = V2::Product::Extraction::ExtractionResponse.new(server_response['extraction_response']) end # rubocop:enable Style/GuardClause end |
Instance Attribute Details
#document_type ⇒ String (readonly)
Returns The document type, as identified on given classification values.
10 11 12 |
# File 'lib/mindee/v2/product/classification/classification_classifier.rb', line 10 def document_type @document_type end |
#extraction_response ⇒ Object (readonly)
Returns the value of attribute extraction_response.
11 12 13 |
# File 'lib/mindee/v2/product/classification/classification_classifier.rb', line 11 def extraction_response @extraction_response end |
Instance Method Details
#to_s ⇒ String
Returns String representation.
24 25 26 |
# File 'lib/mindee/v2/product/classification/classification_classifier.rb', line 24 def to_s "Document Type: #{@document_type}" end |