Class: Mindee::V1::Parsing::Common::Orientation
- Inherits:
-
Object
- Object
- Mindee::V1::Parsing::Common::Orientation
- Defined in:
- lib/mindee/v1/parsing/common/orientation.rb
Overview
Page orientation
Instance Attribute Summary collapse
- #page_id ⇒ Integer? readonly
-
#value ⇒ Integer?
readonly
A prediction among these 3 possible outputs: * 0 degrees: the page is already upright * 90 degrees: the page must be rotated clockwise to be upright * 270 degrees: the page must be rotated counterclockwise to be upright.
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ Orientation
constructor
A new instance of Orientation.
Constructor Details
#initialize(prediction, page_id) ⇒ Orientation
Returns a new instance of Orientation.
20 21 22 23 |
# File 'lib/mindee/v1/parsing/common/orientation.rb', line 20 def initialize(prediction, page_id) @value = prediction['value'] @page_id = page_id end |
Instance Attribute Details
#page_id ⇒ Integer? (readonly)
10 11 12 |
# File 'lib/mindee/v1/parsing/common/orientation.rb', line 10 def page_id @page_id end |
#value ⇒ Integer? (readonly)
A prediction among these 3 possible outputs:
- 0 degrees: the page is already upright
- 90 degrees: the page must be rotated clockwise to be upright
- 270 degrees: the page must be rotated counterclockwise to be upright
16 17 18 |
# File 'lib/mindee/v1/parsing/common/orientation.rb', line 16 def value @value end |