Class: NeSpat::Executors::Default

Inherits:
Base
  • Object
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

Constructor Details

This class inherits a constructor from NeSpat::Executors::Base

Instance Method Details

#callObject



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_speedObject



15
16
17
# File 'lib/ne_spat/executors/default.rb', line 15

def default_speed
  SPEED
end