public Method

RecursiveHTTPFetcher.links(base_url, contents)

There's no documentation for this item.

Source Code

# File commands/plugin.rb, line 884
def links(base_url, contents)
  links = []
  contents.scan(/href\s*=\s*\"*[^\">]*/i) do |link|
    link = link.sub(/href="/i, "")
    next if link =~ /^http/i || link =~ /^\./
    links << File.join(base_url, link)
  end
  links
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.