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.
265 266 267 268 |
# File 'lib/kreuzberg/result.rb', line 265 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.
263 264 265 |
# File 'lib/kreuzberg/result.rb', line 263 def angle_degrees @angle_degrees end |
#confidence ⇒ Object (readonly)
Returns the value of attribute confidence.
263 264 265 |
# File 'lib/kreuzberg/result.rb', line 263 def confidence @confidence end |
Instance Method Details
#to_h ⇒ Object
270 271 272 273 274 275 |
# File 'lib/kreuzberg/result.rb', line 270 def to_h { angle_degrees: @angle_degrees, confidence: @confidence }.compact end |