Class: TestaAppiumDriver::Coordinates

Inherits:
Object
  • Object
show all
Defined in:
lib/testa_appium_driver/common/bounds.rb

Overview

noinspection ALL

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Coordinates

Returns a new instance of Coordinates.



90
91
92
93
# File 'lib/testa_appium_driver/common/bounds.rb', line 90

def initialize(x, y)
  @x = x.to_i
  @y = y.to_i
end

Instance Method Details

#as_jsonObject



95
96
97
98
99
100
# File 'lib/testa_appium_driver/common/bounds.rb', line 95

def as_json
  {
    x: @x,
    y: @y
  }
end

#xInteger

Returns:

  • (Integer)


103
104
105
# File 'lib/testa_appium_driver/common/bounds.rb', line 103

def x
  @x
end

#yInteger

Returns:

  • (Integer)


108
109
110
# File 'lib/testa_appium_driver/common/bounds.rb', line 108

def y
  @y
end