Class: Kreuzberg::Result::ElementBoundingBox

Inherits:
Struct
  • Object
show all
Defined in:
lib/kreuzberg/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#x0Float (readonly)

Returns Left x-coordinate.

Returns:

  • (Float)

    Left x-coordinate



189
190
191
192
193
# File 'lib/kreuzberg/result.rb', line 189

ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1) do
  def to_h
    { x0: x0, y0: y0, x1: x1, y1: y1 }
  end
end

#x1Float (readonly)

Returns Right x-coordinate.

Returns:

  • (Float)

    Right x-coordinate



189
190
191
192
193
# File 'lib/kreuzberg/result.rb', line 189

ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1) do
  def to_h
    { x0: x0, y0: y0, x1: x1, y1: y1 }
  end
end

#y0Float (readonly)

Returns Bottom y-coordinate.

Returns:

  • (Float)

    Bottom y-coordinate



189
190
191
192
193
# File 'lib/kreuzberg/result.rb', line 189

ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1) do
  def to_h
    { x0: x0, y0: y0, x1: x1, y1: y1 }
  end
end

#y1Float (readonly)

Returns Top y-coordinate.

Returns:

  • (Float)

    Top y-coordinate



189
190
191
192
193
# File 'lib/kreuzberg/result.rb', line 189

ElementBoundingBox = Struct.new(:x0, :y0, :x1, :y1) do
  def to_h
    { x0: x0, y0: y0, x1: x1, y1: y1 }
  end
end

Instance Method Details

#to_hObject



190
191
192
# File 'lib/kreuzberg/result.rb', line 190

def to_h
  { x0: x0, y0: y0, x1: x1, y1: y1 }
end