Class: Hokusai::Automation::DriverCommands::Invoke
- Defined in:
- ui/src/hokusai/automation/driver_commands/invoke.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Base
#last_parent, #request_id, #state, #status
Instance Method Summary collapse
- #execute(block, canvas, input) ⇒ Object
-
#initialize(hash) ⇒ Invoke
constructor
A new instance of Invoke.
- #location ⇒ Object
- #method ⇒ Object
- #on_complete ⇒ Object
Methods inherited from Base
#matches_block, #matches_blocks, #mouse_center, #mouse_move
Constructor Details
#initialize(hash) ⇒ Invoke
Returns a new instance of Invoke.
14 15 16 17 18 |
# File 'ui/src/hokusai/automation/driver_commands/invoke.rb', line 14 def initialize(hash) @value = nil super end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'ui/src/hokusai/automation/driver_commands/invoke.rb', line 4 def value @value end |
Instance Method Details
#execute(block, canvas, input) ⇒ Object
24 25 26 27 28 29 30 |
# File 'ui/src/hokusai/automation/driver_commands/invoke.rb', line 24 def execute(block, canvas, input) return unless matches_block(blocks[0]) self.value = blocks[0].public_send(method) done! end |
#location ⇒ Object
6 7 8 |
# File 'ui/src/hokusai/automation/driver_commands/invoke.rb', line 6 def location state[:uuid] end |
#method ⇒ Object
10 11 12 |
# File 'ui/src/hokusai/automation/driver_commands/invoke.rb', line 10 def method state[:method] end |
#on_complete ⇒ Object
20 21 22 |
# File 'ui/src/hokusai/automation/driver_commands/invoke.rb', line 20 def on_complete return value if done? end |