Class: Hokusai::Automation::DriverCommands::TriggerMouseBase

Inherits:
Base
  • Object
show all
Includes:
MouseMethods
Defined in:
ui/src/hokusai/automation/driver_commands/trigger_mouse.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#last_parent, #request_id, #state, #status

Instance Method Summary collapse

Methods included from MouseMethods

#trigger_mouse

Methods inherited from Base

#execute, #matches_block, #matches_blocks, #mouse_center, #mouse_move

Constructor Details

#initialize(hash) ⇒ TriggerMouseBase

Returns a new instance of TriggerMouseBase.



16
17
18
19
20
# File 'ui/src/hokusai/automation/driver_commands/trigger_mouse.rb', line 16

def initialize(hash)
  @value = false

  super
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



14
15
16
# File 'ui/src/hokusai/automation/driver_commands/trigger_mouse.rb', line 14

def value
  @value
end

Instance Method Details

#buttonObject



26
27
28
# File 'ui/src/hokusai/automation/driver_commands/trigger_mouse.rb', line 26

def button
  state[:button]
end

#locationObject



22
23
24
# File 'ui/src/hokusai/automation/driver_commands/trigger_mouse.rb', line 22

def location
  state[:uuid]
end

#on_completeObject



30
31
32
33
34
# File 'ui/src/hokusai/automation/driver_commands/trigger_mouse.rb', line 30

def on_complete
  return value if done?

  return Automation::Error.new("Could not locate block")
end