Class: OmniAI::Mistral::OCR::Dimensions
- Inherits:
-
Object
- Object
- OmniAI::Mistral::OCR::Dimensions
- Defined in:
- lib/omniai/mistral/ocr/dimensions.rb
Overview
Dimensions returned by the OCR API.
Instance Attribute Summary collapse
-
#dpi ⇒ Object
!@attribute [rw] dpi @return [Integer].
-
#height ⇒ Object
!@attribute [rw] height @return [Integer].
-
#width ⇒ Object
!@attribute [rw] width @return [Integer].
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(width:, height:, dpi:) ⇒ Dimensions
constructor
A new instance of Dimensions.
Constructor Details
#initialize(width:, height:, dpi:) ⇒ Dimensions
Returns a new instance of Dimensions.
23 24 25 26 27 |
# File 'lib/omniai/mistral/ocr/dimensions.rb', line 23 def initialize(width:, height:, dpi:) @width = width @height = height @dpi = dpi end |
Instance Attribute Details
#dpi ⇒ Object
!@attribute [rw] dpi
@return [Integer]
18 19 20 |
# File 'lib/omniai/mistral/ocr/dimensions.rb', line 18 def dpi @dpi end |
#height ⇒ Object
!@attribute [rw] height
@return [Integer]
14 15 16 |
# File 'lib/omniai/mistral/ocr/dimensions.rb', line 14 def height @height end |
#width ⇒ Object
!@attribute [rw] width
@return [Integer]
10 11 12 |
# File 'lib/omniai/mistral/ocr/dimensions.rb', line 10 def width @width end |
Class Method Details
.parse(data:) ⇒ Dimensions
32 33 34 |
# File 'lib/omniai/mistral/ocr/dimensions.rb', line 32 def self.parse(data:) new(width: data["width"], height: data["height"], dpi: data["dpi"]) end |