Class: Puppeteer::Launcher::LaunchOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/puppeteer/launcher/launch_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ LaunchOptions

Returns a new instance of LaunchOptions.



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/puppeteer/launcher/launch_options.rb', line 35

def initialize(options)
  @channel = options[:channel]
  @executable_path = options[:executable_path]
  @ignore_default_args = options[:ignore_default_args] || false
  @handle_SIGINT = options.fetch(:handle_SIGINT, true)
  @handle_SIGTERM = options.fetch(:handle_SIGTERM, true)
  @handle_SIGHUP = options.fetch(:handle_SIGHUP, true)
  @timeout = options[:timeout] || 30000
  @dumpio = options[:dumpio] || false
  @env = options[:env] || ENV
  @pipe = options[:pipe] || false
  @wait_for_initial_page = options.fetch(:wait_for_initial_page, true)
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



49
50
51
# File 'lib/puppeteer/launcher/launch_options.rb', line 49

def channel
  @channel
end

#envObject (readonly)

Returns the value of attribute env.



49
50
51
# File 'lib/puppeteer/launcher/launch_options.rb', line 49

def env
  @env
end

#executable_pathObject (readonly)

Returns the value of attribute executable_path.



49
50
51
# File 'lib/puppeteer/launcher/launch_options.rb', line 49

def executable_path
  @executable_path
end

#ignore_default_argsObject (readonly)

Returns the value of attribute ignore_default_args.



49
50
51
# File 'lib/puppeteer/launcher/launch_options.rb', line 49

def ignore_default_args
  @ignore_default_args
end

#timeoutObject (readonly)

Returns the value of attribute timeout.



49
50
51
# File 'lib/puppeteer/launcher/launch_options.rb', line 49

def timeout
  @timeout
end

Instance Method Details

#dumpio?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/puppeteer/launcher/launch_options.rb', line 63

def dumpio?
  @dumpio
end

#handle_SIGHUP?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/puppeteer/launcher/launch_options.rb', line 59

def handle_SIGHUP?
  @handle_SIGHUP
end

#handle_SIGINT?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/puppeteer/launcher/launch_options.rb', line 51

def handle_SIGINT?
  @handle_SIGINT
end

#handle_SIGTERM?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/puppeteer/launcher/launch_options.rb', line 55

def handle_SIGTERM?
  @handle_SIGTERM
end

#pipe?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/puppeteer/launcher/launch_options.rb', line 67

def pipe?
  @pipe
end

#wait_for_initial_page?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/puppeteer/launcher/launch_options.rb', line 71

def wait_for_initial_page?
  @wait_for_initial_page
end