Module: Wwwtf::HTTP::URL
- Defined in:
- lib/wwwtf/http/url.rb
Class Method Summary collapse
Class Method Details
.same(url1, url2) ⇒ Object
11 12 13 14 15 |
# File 'lib/wwwtf/http/url.rb', line 11 def self.same(url1, url2) url1 = url1.gsub(/^https*\:\/\//, '') url2 = url2.gsub(/^https*\:\/\//, '') File.(url) === File.(url2) end |
.uniq(urls) ⇒ Object
17 18 19 |
# File 'lib/wwwtf/http/url.rb', line 17 def self.uniq(urls) urls.collect{|url| unroot(url)}.uniq end |
.unroot(url) ⇒ Object
7 8 9 |
# File 'lib/wwwtf/http/url.rb', line 7 def self.unroot(url) File.join File.dirname(url), File.basename(url) end |