Class: ICuke::Simulate::Gestures::Tap
- Inherits:
-
Object
- Object
- ICuke::Simulate::Gestures::Tap
- Defined in:
- lib/icuke/simulate.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#x ⇒ Object
Returns the value of attribute x.
-
#y ⇒ Object
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y, options = {}) ⇒ Tap
constructor
A new instance of Tap.
- #to_json(*a) ⇒ Object
Constructor Details
#initialize(x, y, options = {}) ⇒ Tap
Returns a new instance of Tap.
80 81 82 83 84 85 |
# File 'lib/icuke/simulate.rb', line 80 def initialize(x, y, = {}) = @x = x @y = y end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
78 79 80 |
# File 'lib/icuke/simulate.rb', line 78 def end |
#x ⇒ Object
Returns the value of attribute x.
78 79 80 |
# File 'lib/icuke/simulate.rb', line 78 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
78 79 80 |
# File 'lib/icuke/simulate.rb', line 78 def y @y end |
Instance Method Details
#to_json(*a) ⇒ Object
87 88 89 90 91 92 |
# File 'lib/icuke/simulate.rb', line 87 def to_json(*a) [ ICuke::Simulate::Events::Touch.new(:down, [[x, y]], ), ICuke::Simulate::Events::Touch.new(:up, [[x, y]]) ].to_json(*a) end |