Class: Browsate::Configuration
- Inherits:
-
Object
- Object
- Browsate::Configuration
- Defined in:
- lib/browsate/configuration.rb
Instance Attribute Summary collapse
-
#chrome_args ⇒ Object
Returns the value of attribute chrome_args.
-
#chrome_path ⇒ Object
Returns the value of attribute chrome_path.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#session_dir ⇒ Object
Returns the value of attribute session_dir.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
-
#viewport_height ⇒ Object
Returns the value of attribute viewport_height.
-
#viewport_width ⇒ Object
Returns the value of attribute viewport_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 |
# File 'lib/browsate/configuration.rb', line 10 def initialize @chrome_path = ENV["CHROME_PATH"] || default_chrome_path @chrome_args = [ "--no-sandbox", "--disable-setuid-sandbox", "--disable-dev-shm-usage", "--disable-accelerated-2d-canvas", "--disable-gpu", "--window-size=1280,800" ] @user_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36" @viewport_width = 1280 @viewport_height = 800 @session_dir = File.join(Dir.pwd, "tmp") @debug = false @timeout = 30 @logger = Logger.new($stdout) @logger.level = Logger::INFO end |
Instance Attribute Details
#chrome_args ⇒ Object
Returns the value of attribute chrome_args.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def chrome_args @chrome_args end |
#chrome_path ⇒ Object
Returns the value of attribute chrome_path.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def chrome_path @chrome_path end |
#debug ⇒ Object
Returns the value of attribute debug.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def debug @debug end |
#logger ⇒ Object
Returns the value of attribute logger.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def logger @logger end |
#session_dir ⇒ Object
Returns the value of attribute session_dir.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def session_dir @session_dir end |
#timeout ⇒ Object
Returns the value of attribute timeout.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def timeout @timeout end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def user_agent @user_agent end |
#viewport_height ⇒ Object
Returns the value of attribute viewport_height.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def @viewport_height end |
#viewport_width ⇒ Object
Returns the value of attribute viewport_width.
7 8 9 |
# File 'lib/browsate/configuration.rb', line 7 def @viewport_width end |