Class: Browserly::Configuration
- Inherits:
-
Object
- Object
- Browserly::Configuration
- Defined in:
- lib/browserly/configuration.rb
Instance Attribute Summary collapse
-
#chrome_args ⇒ Object
Returns the value of attribute chrome_args.
-
#height ⇒ Object
Returns the value of attribute height.
-
#output_dir ⇒ Object
Returns the value of attribute output_dir.
-
#remote_driver ⇒ Object
Returns the value of attribute remote_driver.
-
#remote_driver_url ⇒ Object
Returns the value of attribute remote_driver_url.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/browserly/configuration.rb', line 10 def initialize @output_dir = File.join(Dir.tmpdir, 'siter_screenshots') unless File.directory?(@output_dir) FileUtils.mkdir_p(@output_dir) end @width = 1280 @height = 780 @remote_driver = true @remote_driver_url = "http://localhost:4444/wd/hub" @chrome_args = [ '--headless', '--hide-scrollbars', '--ignore-certificate-errors', '--disable-popup-blocking', '--disable-translate', "--window-size=#{@width},#{@height}", '--enable-font-antialiasing', '--font-cache-shared-handle[6]' ] end |
Instance Attribute Details
#chrome_args ⇒ Object
Returns the value of attribute chrome_args.
3 4 5 |
# File 'lib/browserly/configuration.rb', line 3 def chrome_args @chrome_args end |
#height ⇒ Object
Returns the value of attribute height.
3 4 5 |
# File 'lib/browserly/configuration.rb', line 3 def height @height end |
#output_dir ⇒ Object
Returns the value of attribute output_dir.
3 4 5 |
# File 'lib/browserly/configuration.rb', line 3 def output_dir @output_dir end |
#remote_driver ⇒ Object
Returns the value of attribute remote_driver.
3 4 5 |
# File 'lib/browserly/configuration.rb', line 3 def remote_driver @remote_driver end |
#remote_driver_url ⇒ Object
Returns the value of attribute remote_driver_url.
3 4 5 |
# File 'lib/browserly/configuration.rb', line 3 def remote_driver_url @remote_driver_url end |
#width ⇒ Object
Returns the value of attribute width.
3 4 5 |
# File 'lib/browserly/configuration.rb', line 3 def width @width end |