Class: Lightpanda::Capybara::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/lightpanda/capybara.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



24
25
26
27
28
29
30
# File 'lib/lightpanda/capybara.rb', line 24

def initialize
  @host = "127.0.0.1"
  @port = 9222
  @timeout = 5
  @headless = true
  @browser_path = nil
end

Instance Attribute Details

#browser_pathObject

Returns the value of attribute browser_path.



22
23
24
# File 'lib/lightpanda/capybara.rb', line 22

def browser_path
  @browser_path
end

#headlessObject

Returns the value of attribute headless.



22
23
24
# File 'lib/lightpanda/capybara.rb', line 22

def headless
  @headless
end

#hostObject

Returns the value of attribute host.



22
23
24
# File 'lib/lightpanda/capybara.rb', line 22

def host
  @host
end

#portObject

Returns the value of attribute port.



22
23
24
# File 'lib/lightpanda/capybara.rb', line 22

def port
  @port
end

#timeoutObject

Returns the value of attribute timeout.



22
23
24
# File 'lib/lightpanda/capybara.rb', line 22

def timeout
  @timeout
end

Instance Method Details

#to_hObject



32
33
34
35
36
37
38
39
# File 'lib/lightpanda/capybara.rb', line 32

def to_h
  {
    host: host,
    port: port,
    timeout: timeout,
    browser_path: browser_path
  }
end