Class: Mindee::Parsing::Standard::BaseField
- Inherits:
-
AbstractField
- Object
- AbstractField
- Mindee::Parsing::Standard::BaseField
- Defined in:
- lib/mindee/parsing/standard/base_field.rb
Overview
Base field object.
Direct Known Subclasses
AmountField, BooleanField, ClassificationField, CompanyRegistrationField, DateField, PaymentDetailsField, StringField, TaxField
Instance Attribute Summary collapse
-
#reconstructed ⇒ bool
readonly
true if the field was reconstructed or computed using other fields.
- #value ⇒ String, ... readonly
Attributes inherited from AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id, reconstructed: false) ⇒ BaseField
constructor
A new instance of BaseField.
Methods inherited from AbstractField
array_confidence, array_sum, float_to_string, #to_s
Constructor Details
#initialize(prediction, page_id, reconstructed: false) ⇒ BaseField
Returns a new instance of BaseField.
20 21 22 23 24 |
# File 'lib/mindee/parsing/standard/base_field.rb', line 20 def initialize(prediction, page_id, reconstructed: false) super(prediction, page_id) @value = prediction['value'] @reconstructed = reconstructed end |
Instance Attribute Details
#reconstructed ⇒ bool (readonly)
true if the field was reconstructed or computed using other fields.
15 16 17 |
# File 'lib/mindee/parsing/standard/base_field.rb', line 15 def reconstructed @reconstructed end |
#value ⇒ String, ... (readonly)
12 13 14 |
# File 'lib/mindee/parsing/standard/base_field.rb', line 12 def value @value end |