instance method
links
Ruby on Rails 3.2.22.5
Since v2.2.3 Last seen in v3.2.22.5Signature
links(base_url, contents)
No documentation comment.
Parameters
-
base_urlreq -
contentsreq
Source
# File railties/lib/rails/commands/plugin.rb, line 506
def links(base_url, contents)
links = []
contents.scan(/href\s*=\s*\"*[^\">]*/i) do |link|
link = link.sub(/href="/i, "")
next if link =~ /svnindex.xsl$/
next if link =~ /^(\w*:|)\/\// || link =~ /^\./
links << File.join(base_url, link)
end
links
end
Defined in railties/lib/rails/commands/plugin.rb line 506
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in RecursiveHTTPFetcher