Class: Mindee::Parsing::Common::Orientation

Inherits:
Object
  • Object
show all
Defined in:
lib/mindee/parsing/common/orientation.rb

Overview

Page orientation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(prediction, page_id) ⇒ 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_idInteger? (readonly)



9
10
11
# File 'lib/mindee/parsing/common/orientation.rb', line 9

def page_id
  @page_id
end

#valueInteger? (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