Class: Kreuzberg::Result::OcrRotation
- Inherits:
-
Object
- Object
- Kreuzberg::Result::OcrRotation
- Defined in:
- lib/kreuzberg/result.rb
Overview
OCR rotation information
Instance Attribute Summary collapse
-
#angle_degrees ⇒ Object
readonly
Returns the value of attribute angle_degrees.
-
#confidence ⇒ Object
readonly
Returns the value of attribute confidence.
Instance Method Summary collapse
-
#initialize(angle_degrees: nil, confidence: nil) ⇒ OcrRotation
constructor
A new instance of OcrRotation.
- #to_h ⇒ Object
Constructor Details
#initialize(angle_degrees: nil, confidence: nil) ⇒ OcrRotation
Returns a new instance of OcrRotation.
288 289 290 291 |
# File 'lib/kreuzberg/result.rb', line 288 def initialize(angle_degrees: nil, confidence: nil) @angle_degrees = angle_degrees&.to_f @confidence = confidence&.to_f end |
Instance Attribute Details
#angle_degrees ⇒ Object (readonly)
Returns the value of attribute angle_degrees.
286 287 288 |
# File 'lib/kreuzberg/result.rb', line 286 def angle_degrees @angle_degrees end |
#confidence ⇒ Object (readonly)
Returns the value of attribute confidence.
286 287 288 |
# File 'lib/kreuzberg/result.rb', line 286 def confidence @confidence end |
Instance Method Details
#to_h ⇒ Object
293 294 295 296 297 298 |
# File 'lib/kreuzberg/result.rb', line 293 def to_h { angle_degrees: @angle_degrees, confidence: @confidence }.compact end |