Class: Puppeteer::Launcher::ChromeArgOptions
- Inherits:
-
Object
- Object
- Puppeteer::Launcher::ChromeArgOptions
- Defined in:
- lib/puppeteer/launcher/chrome_arg_options.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#debugging_port ⇒ Object
readonly
Returns the value of attribute debugging_port.
-
#enable_extensions ⇒ Object
readonly
Returns the value of attribute enable_extensions.
-
#user_data_dir ⇒ Object
readonly
Returns the value of attribute user_data_dir.
Instance Method Summary collapse
- #devtools? ⇒ Boolean
- #headless? ⇒ Boolean
-
#initialize(options) ⇒ ChromeArgOptions
constructor
-
@property boolean= headless * @property Array<string>= args * @property string= userDataDir * @property boolean= devtools.
-
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 38 39 |
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 29 def initialize() @args = [:args] || [] @user_data_dir = [:user_data_dir] @devtools = [:devtools] || false @headless = [:headless] @enable_extensions = [:enable_extensions] || false if @headless.nil? @headless = !@devtools end @debugging_port = [:debugging_port] || 0 end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
41 42 43 |
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 41 def args @args end |
#debugging_port ⇒ Object (readonly)
Returns the value of attribute debugging_port.
41 42 43 |
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 41 def debugging_port @debugging_port end |
#enable_extensions ⇒ Object (readonly)
Returns the value of attribute enable_extensions.
41 42 43 |
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 41 def enable_extensions @enable_extensions end |
#user_data_dir ⇒ Object (readonly)
Returns the value of attribute user_data_dir.
41 42 43 |
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 41 def user_data_dir @user_data_dir end |
Instance Method Details
#devtools? ⇒ Boolean
47 48 49 |
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 47 def devtools? @devtools end |
#headless? ⇒ Boolean
43 44 45 |
# File 'lib/puppeteer/launcher/chrome_arg_options.rb', line 43 def headless? @headless end |