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