Class: Vessel::Driver::Mechanize::Driver
Instance Attribute Summary
#browser, #proxy, #settings
Class Method Summary
collapse
Instance Method Summary
collapse
direct_network_errors, driver_name, #go_to, #initialize, #restart
Constructor Details
This class inherits a constructor from Vessel::Driver
Class Method Details
.indirect_network_errors ⇒ Object
10
11
12
|
# File 'lib/vessel/driver/mechanize/driver.rb', line 10
def self.indirect_network_errors
@indirect_network_errors ||= (super + [::Mechanize::ResponseCodeError]).freeze
end
|
Instance Method Details
#create_page(proxy: nil) ⇒ Object
24
25
26
27
28
29
30
31
|
# File 'lib/vessel/driver/mechanize/driver.rb', line 24
def create_page(proxy: nil)
mechanize = ::Mechanize.new do |m|
m.user_agent = settings.dig(:headers, "User-Agent")
m.set_proxy(proxy[:host], proxy[:port], proxy[:user], proxy[:password]) if proxy
end
Page.new(mechanize)
end
|
#start ⇒ Object
16
17
18
|
# File 'lib/vessel/driver/mechanize/driver.rb', line 16
def start
end
|
#stop ⇒ Object
20
21
22
|
# File 'lib/vessel/driver/mechanize/driver.rb', line 20
def stop
end
|