Class: NeSpat::Executors::Default
- Inherits:
-
Base
- Object
- Base
- NeSpat::Executors::Default
show all
- Defined in:
- lib/ne_spat/executors/default.rb
Constant Summary
collapse
- SPEED =
50
- DELTA =
[1, -1]
Instance Attribute Summary
Attributes inherited from Base
#config, #mouse
Instance Method Summary
collapse
Methods inherited from Base
call, #initialize
Instance Method Details
#call ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/ne_spat/executors/default.rb', line 7
def call
loop do
sleep(interval)
position = mouse.position
mouse.move(position[:x] + DELTA.sample, position[:y] + DELTA.sample)
end
end
|
#default_speed ⇒ Object
15
16
17
|
# File 'lib/ne_spat/executors/default.rb', line 15
def default_speed
SPEED
end
|