Class: Mindee::V1::Parsing::Standard::BooleanField
- Inherits:
-
BaseField
- Object
- AbstractField
- BaseField
- Mindee::V1::Parsing::Standard::BooleanField
- Defined in:
- lib/mindee/v1/parsing/standard/boolean_field.rb
Overview
Represents basic text information.
Instance Attribute Summary collapse
-
#value ⇒ bool?
readonly
Value as bool.
Attributes inherited from BaseField
Attributes inherited from AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id = nil, reconstructed: false) ⇒ BooleanField
constructor
A new instance of BooleanField.
- #to_s ⇒ String
Methods inherited from AbstractField
array_confidence, array_sum, float_to_string
Constructor Details
#initialize(prediction, page_id = nil, reconstructed: false) ⇒ BooleanField
Returns a new instance of BooleanField.
15 16 17 |
# File 'lib/mindee/v1/parsing/standard/boolean_field.rb', line 15 def initialize(prediction, page_id = nil, reconstructed: false) super end |
Instance Attribute Details
#value ⇒ bool? (readonly)
Value as bool
13 14 15 |
# File 'lib/mindee/v1/parsing/standard/boolean_field.rb', line 13 def value @value end |
Instance Method Details
#to_s ⇒ String
20 21 22 23 24 |
# File 'lib/mindee/v1/parsing/standard/boolean_field.rb', line 20 def to_s return '' if value.nil? value ? 'True' : 'False' end |