lib/darkext/sitemap_generator.rb in darkhelmet-darkext-0.10.0 vs lib/darkext/sitemap_generator.rb in darkhelmet-darkext-0.11.0

- old
+ new

@@ -41,11 +41,11 @@ end def index(url, target = $stdout) @pages << url - root = open(url) { |f| Hpricot(f) } + root = Hpricot(open(url)) (root/"a.#{@options.nested_find(:forum,:class)}").each do |link| index_forum(link.attributes['href'].to_s) end xml = Builder::XmlMarkup.new(:target => $stdout, :indent => 1) @@ -75,10 +75,10 @@ end end private def index_forum(href) - root = open(href) { |f| Hpricot(f) } + root = Hpricot(open(href)) (root/"a.#{@options.nested_find(:forum,:class)}").each do |link| index_forum(link.attributes['href'].to_s) end (root/"a.#{@options.nested_find(:topic,:class)}").each do |link| @topics << link.attributes['href'].to_s