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



166
167
168
169
170
# File 'lib/kreuzberg/result.rb', line 166

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



166
167
168
169
170
# File 'lib/kreuzberg/result.rb', line 166

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



166
167
168
169
170
# File 'lib/kreuzberg/result.rb', line 166

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



166
167
168
169
170
# File 'lib/kreuzberg/result.rb', line 166

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



167
168
169
# File 'lib/kreuzberg/result.rb', line 167

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