Class: Dhalang::Puppeteer
- Inherits:
-
Object
- Object
- Dhalang::Puppeteer
- Defined in:
- lib/Dhalang/puppeteer.rb
Overview
Contains common logic for interacting with Puppeteer.
Class Method Summary collapse
-
.visit(page_url, script_path, temp_file_path, temp_file_extension) ⇒ Object
Launches a new Node process, executing the (Puppeteer) script under the given script_path.
Class Method Details
.visit(page_url, script_path, temp_file_path, temp_file_extension) ⇒ Object
Launches a new Node process, executing the (Puppeteer) script under the given script_path.
13 14 15 |
# File 'lib/Dhalang/puppeteer.rb', line 13 def self.visit(page_url, script_path, temp_file_path, temp_file_extension) system("node #{script_path} #{Shellwords.escape(NODE_MODULES_PATH)} #{page_url} #{Shellwords.escape(temp_file_path)} #{Shellwords.escape(temp_file_extension)}") end |