Class: Mindee::Parsing::Standard::Field
- Inherits:
-
AbstractField
- Object
- AbstractField
- Mindee::Parsing::Standard::Field
- 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 ⇒ Boolean
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) ⇒ Field
constructor
A new instance of Field.
Methods inherited from AbstractField
array_confidence, array_sum, float_to_string, #to_s
Constructor Details
#initialize(prediction, page_id, reconstructed: false) ⇒ Field
Returns a new instance of Field.
82 83 84 85 86 |
# File 'lib/mindee/parsing/standard/base_field.rb', line 82 def initialize(prediction, page_id, reconstructed: false) super(prediction, page_id) @value = prediction['value'] @reconstructed = reconstructed end |
Instance Attribute Details
#reconstructed ⇒ Boolean (readonly)
true if the field was reconstructed or computed using other fields.
77 78 79 |
# File 'lib/mindee/parsing/standard/base_field.rb', line 77 def reconstructed @reconstructed end |
#value ⇒ String, ... (readonly)
74 75 76 |
# File 'lib/mindee/parsing/standard/base_field.rb', line 74 def value @value end |