Class: Kreuzberg::Result::ElementBoundingBox
- Inherits:
-
Struct
- Object
- Struct
- Kreuzberg::Result::ElementBoundingBox
- Defined in:
- lib/kreuzberg/result.rb
Instance Attribute Summary collapse
-
#x0 ⇒ Float
readonly
Left x-coordinate.
-
#x1 ⇒ Float
readonly
Right x-coordinate.
-
#y0 ⇒ Float
readonly
Bottom y-coordinate.
-
#y1 ⇒ Float
readonly
Top y-coordinate.
Instance Method Summary collapse
Instance Attribute Details
#x0 ⇒ Float (readonly)
Returns Left x-coordinate.
164 165 166 167 168 |
# File 'lib/kreuzberg/result.rb', line 164 ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1, keyword_init: true) do def to_h { x0: x0, y0: y0, x1: x1, y1: y1 } end end |
#x1 ⇒ Float (readonly)
Returns Right x-coordinate.
164 165 166 167 168 |
# File 'lib/kreuzberg/result.rb', line 164 ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1, keyword_init: true) do def to_h { x0: x0, y0: y0, x1: x1, y1: y1 } end end |
#y0 ⇒ Float (readonly)
Returns Bottom y-coordinate.
164 165 166 167 168 |
# File 'lib/kreuzberg/result.rb', line 164 ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1, keyword_init: true) do def to_h { x0: x0, y0: y0, x1: x1, y1: y1 } end end |
#y1 ⇒ Float (readonly)
Returns Top y-coordinate.
164 165 166 167 168 |
# File 'lib/kreuzberg/result.rb', line 164 ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1, keyword_init: true) do def to_h { x0: x0, y0: y0, x1: x1, y1: y1 } end end |
Instance Method Details
#to_h ⇒ Object
165 166 167 |
# File 'lib/kreuzberg/result.rb', line 165 def to_h { x0: x0, y0: y0, x1: x1, y1: y1 } end |