Class: Puppeteer::Launcher::ChromeArgOptions

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ ChromeArgOptions

  • @property boolean= headless

  • @property Array<string>= args

  • @property string= userDataDir

  • @property boolean= devtools



29
30
31
32
33
34
35
36
37
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 29

def initialize(options)
  @args = options[:args] || []
  @user_data_dir = options[:user_data_dir]
  @devtools = options[:devtools] || false
  @headless = options[:headless]
  if @headless.nil?
    @headless = !@devtools
  end
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



39
40
41
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 39

def args
  @args
end

#user_data_dirObject (readonly)

Returns the value of attribute user_data_dir.



39
40
41
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 39

def user_data_dir
  @user_data_dir
end

Instance Method Details

#devtools?Boolean

Returns:

  • (Boolean)


45
46
47
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 45

def devtools?
  @devtools
end

#headless?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 41

def headless?
  @headless
end