lib/image_scraper/util.rb in image_scraper-0.1.2 vs lib/image_scraper/util.rb in image_scraper-0.1.3

- old
+ new

@@ -1,8 +1,8 @@ module ImageScraper module Util def self.absolute_url(url,asset=nil) - return domain(url) + path(url) if asset.nil? and asset.include("://") + return url if asset.nil? return asset if asset.include?("://") return domain(url)+asset if asset[0]=="/" return domain(url) =~ /\/$/ ? domain(url)+asset : domain(url)+"/"+asset end \ No newline at end of file