Class: Puppeteer::ElementHandle::BoundingBox

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/element_handle/bounding_box.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of BoundingBox.



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

#heightObject (readonly)

Returns the value of attribute height.



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

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width.



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

def width
  @width
end

#xObject (readonly)

Returns the value of attribute x.



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

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



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

def y
  @y
end