Class: Mindee::Parsing::Common::Orientation
- Inherits:
-
Object
- Object
- Mindee::Parsing::Common::Orientation
- Defined in:
- lib/mindee/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.
19 20 21 22 |
# File 'lib/mindee/parsing/common/orientation.rb', line 19 def initialize(prediction, page_id) @value = prediction['value'] @page_id = page_id end |
Instance Attribute Details
#page_id ⇒ Integer (readonly)
9 10 11 |
# File 'lib/mindee/parsing/common/orientation.rb', line 9 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
15 16 17 |
# File 'lib/mindee/parsing/common/orientation.rb', line 15 def value @value end |