Class: Puppeteer::ElementHandle::Point
- Inherits:
-
Object
- Object
- Puppeteer::ElementHandle::Point
- Defined in:
- lib/puppeteer/element_handle/point.rb
Overview
A class to represent (x, y)-coordinates supporting + and / operators.
Instance Attribute Summary collapse
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
- #+(other) ⇒ Object
- #/(num) ⇒ Object
-
#initialize(x:, y:) ⇒ Point
constructor
A new instance of Point.
Constructor Details
#initialize(x:, y:) ⇒ Point
Returns a new instance of Point.
5 6 7 8 |
# File 'lib/puppeteer/element_handle/point.rb', line 5 def initialize(x:, y:) @x = x @y = y end |
Instance Attribute Details
#x ⇒ Object (readonly)
Returns the value of attribute x.
24 25 26 |
# File 'lib/puppeteer/element_handle/point.rb', line 24 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
24 25 26 |
# File 'lib/puppeteer/element_handle/point.rb', line 24 def y @y end |