Class: Puppeteer::Launcher::BrowserOptions
- Inherits:
-
Object
- Object
- Puppeteer::Launcher::BrowserOptions
- Defined in:
- lib/puppeteer/launcher/browser_options.rb
Instance Attribute Summary collapse
-
#default_viewport ⇒ Object
readonly
Returns the value of attribute default_viewport.
-
#slow_mo ⇒ Object
readonly
Returns the value of attribute slow_mo.
Instance Method Summary collapse
- #ignore_https_errors? ⇒ Boolean
-
#initialize(options) ⇒ BrowserOptions
constructor
A new instance of BrowserOptions.
Constructor Details
#initialize(options) ⇒ BrowserOptions
Returns a new instance of BrowserOptions.
29 30 31 32 33 34 |
# File 'lib/puppeteer/launcher/browser_options.rb', line 29 def initialize() @ignore_https_errors = [:ignore_https_errors] || false # `default_viewport: nil` must be respected here. @default_viewport = .key?(:default_viewport) ? [:default_viewport] : Puppeteer::Viewport.new(width: 800, height: 600) @slow_mo = [:slow_mo] || 0 end |
Instance Attribute Details
#default_viewport ⇒ Object (readonly)
Returns the value of attribute default_viewport.
36 37 38 |
# File 'lib/puppeteer/launcher/browser_options.rb', line 36 def @default_viewport end |
#slow_mo ⇒ Object (readonly)
Returns the value of attribute slow_mo.
36 37 38 |
# File 'lib/puppeteer/launcher/browser_options.rb', line 36 def slow_mo @slow_mo end |
Instance Method Details
#ignore_https_errors? ⇒ Boolean
38 39 40 |
# File 'lib/puppeteer/launcher/browser_options.rb', line 38 def ignore_https_errors? @ignore_https_errors end |