Class: HeadlessBrowserTool::Tools::AutoNarrateTool

Inherits:
BaseTool
  • Object
show all
Defined in:
lib/headless_browser_tool/tools/auto_narrate_tool.rb

Instance Method Summary collapse

Instance Method Details

#execute(enabled: true) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/headless_browser_tool/tools/auto_narrate_tool.rb', line 15

def execute(enabled: true)
  if enabled
    inject_narration_script
    "Auto-narration enabled. Browser will now describe significant events."
  else
    disable_narration
    "Auto-narration disabled."
  end
end