lib/capybara/mechanize.rb in capybara-mechanize-1.11.0 vs lib/capybara/mechanize.rb in capybara-mechanize-1.12.0
- old
+ new
@@ -1,24 +1,23 @@
+# frozen_string_literal: true
+
require 'capybara'
module Capybara::Mechanize
class << self
-
# Host that should be considered local (includes default_host)
def local_hosts
@local_hosts ||= begin
- default_host = URI.parse(Capybara.default_host || "").host || Capybara.default_host
+ default_host = URI.parse(Capybara.default_host || '').host || Capybara.default_host
[default_host].compact
end
end
- def local_hosts=(hosts)
- @local_hosts = hosts
- end
+ attr_writer :local_hosts
end
end
require 'capybara/mechanize/driver'
Capybara.register_driver :mechanize do |app|
Capybara::Mechanize::Driver.new(app)
-end
\ No newline at end of file
+end