module SitemapMaker::SiteTree
Public Class Methods
own_links(url)
click to toggle source
return url have links with own domain
# File lib/SitemapMaker/site_tree.rb, line 17 def own_links(url) #=> own page have own links ["http://dlab-inc.jp", "http://dlab-inc.jp/company.html"] Tree.new(url).own_links end
root(url)
click to toggle source
return domain
# File lib/SitemapMaker/site_tree.rb, line 6 def root(url) uri = URI.parse(url) "http://#{uri.host}" end
tree_all(url, tree_level = 5)
click to toggle source
return url have all links with own domain
# File lib/SitemapMaker/site_tree.rb, line 12 def tree_all(url, tree_level = 5) #=> recursive all links ["http://dlab-inc.jp", "http://dlab-inc.jp/company.html"...] Tree.new(url).tree_all(url, {}, tree_level) end
Private Instance Methods
own_links(url)
click to toggle source
return url have links with own domain
# File lib/SitemapMaker/site_tree.rb, line 17 def own_links(url) #=> own page have own links ["http://dlab-inc.jp", "http://dlab-inc.jp/company.html"] Tree.new(url).own_links end
root(url)
click to toggle source
return domain
# File lib/SitemapMaker/site_tree.rb, line 6 def root(url) uri = URI.parse(url) "http://#{uri.host}" end
tree_all(url, tree_level = 5)
click to toggle source
return url have all links with own domain
# File lib/SitemapMaker/site_tree.rb, line 12 def tree_all(url, tree_level = 5) #=> recursive all links ["http://dlab-inc.jp", "http://dlab-inc.jp/company.html"...] Tree.new(url).tree_all(url, {}, tree_level) end