Class: AmazonTRP::BoundingBox
- Inherits:
-
Object
- Object
- AmazonTRP::BoundingBox
- Defined in:
- lib/amazon-textract-parser-ruby.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
- #bottom ⇒ Object
-
#initialize(width, height, left, top) ⇒ BoundingBox
constructor
A new instance of BoundingBox.
- #right ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(width, height, left, top) ⇒ BoundingBox
Returns a new instance of BoundingBox.
17 18 19 20 21 22 |
# File 'lib/amazon-textract-parser-ruby.rb', line 17 def initialize(width, height, left, top) @width = width @height = height @left = left @top = top end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
13 14 15 |
# File 'lib/amazon-textract-parser-ruby.rb', line 13 def height @height end |
#left ⇒ Object (readonly)
Returns the value of attribute left.
14 15 16 |
# File 'lib/amazon-textract-parser-ruby.rb', line 14 def left @left end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
15 16 17 |
# File 'lib/amazon-textract-parser-ruby.rb', line 15 def top @top end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
12 13 14 |
# File 'lib/amazon-textract-parser-ruby.rb', line 12 def width @width end |
Instance Method Details
#bottom ⇒ Object
32 33 34 |
# File 'lib/amazon-textract-parser-ruby.rb', line 32 def bottom @top + @height end |
#right ⇒ Object
28 29 30 |
# File 'lib/amazon-textract-parser-ruby.rb', line 28 def right @left + @width end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/amazon-textract-parser-ruby.rb', line 24 def to_s "width: #{@width}, height: #{@height}, left: #{@left}, top: #{@top}" end |