Class: Puppeteer::ElementHandle::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/element_handle/bounding_box.rb,
sig/_supplementary.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x:, y:, width:, height:) ⇒ BoundingBox

Returns a new instance of BoundingBox.

Parameters:

  • x: (Numeric)
  • y: (Numeric)
  • width: (Numeric)
  • height: (Numeric)


3
4
5
6
7
8
# File 'lib/puppeteer/element_handle/bounding_box.rb', line 3

def initialize(x:, y:, width:, height:)
  @x = x
  @y = y
  @width = width
  @height = height
end

Instance Attribute Details

#heightNumeric (readonly)

Returns the value of attribute height.

Returns:

  • (Numeric)


10
11
12
# File 'lib/puppeteer/element_handle/bounding_box.rb', line 10

def height
  @height
end

#widthNumeric (readonly)

Returns the value of attribute width.

Returns:

  • (Numeric)


10
11
12
# File 'lib/puppeteer/element_handle/bounding_box.rb', line 10

def width
  @width
end

#xNumeric (readonly)

Returns the value of attribute x.

Returns:

  • (Numeric)


10
11
12
# File 'lib/puppeteer/element_handle/bounding_box.rb', line 10

def x
  @x
end

#yNumeric (readonly)

Returns the value of attribute y.

Returns:

  • (Numeric)


10
11
12
# File 'lib/puppeteer/element_handle/bounding_box.rb', line 10

def y
  @y
end