Class: Mindee::V2::Product::Classification::ClassificationClassifier

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/v2/product/classification/classification_classifier.rb

Overview

Classification of document type from the source file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server_response) ⇒ ClassificationClassifier

Returns a new instance of ClassificationClassifier.

Parameters:

  • server_response (Hash)

    Hash representation of the JSON returned by the service.



13
14
15
# File 'lib/mindee/v2/product/classification/classification_classifier.rb', line 13

def initialize(server_response)
  @document_type = server_response['document_type']
end

Instance Attribute Details

#document_typeString (readonly)

Returns The document type, as identified on given classification values.

Returns:

  • (String)

    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

Instance Method Details

#to_sString

Returns String representation.

Returns:

  • (String)

    String representation.



18
19
20
# File 'lib/mindee/v2/product/classification/classification_classifier.rb', line 18

def to_s
  "Document Type: #{@document_type}"
end