# File lib/scrubyt/core/navigation/fetch_action.rb, line 140 def self.store_host_name(doc_url) @@host_name = 'http://' + @@mechanize_doc.uri.to_s.scan(/http:\/\/(.+\/)+/).flatten[0] if @@current_doc_protocol == 'http' @@host_name = 'https://' + @@mechanize_doc.uri.to_s.scan(/https:\/\/(.+\/)+/).flatten[0] if @@current_doc_protocol == 'https' @@host_name = doc_url if @@host_name == nil @@host_name = @@host_name[0..-2] if @@host_name[-1].chr == '/' @@original_host_name ||= @@host_name end