Permalink
Browse files

Working out a nokogiri idea

  • Loading branch information...
1 parent 0adb315 commit 86d73356955d5356e3423582ad4337a3ed87afd4 @miketierney committed May 30, 2009
Showing with 9 additions and 0 deletions.
  1. +9 −0 nokogiri_css_search.rb
View
@@ -0,0 +1,9 @@
+require 'nokogiri'
+
+doc = Nokogiri::HTML(open('doc.html'))
+
+selectors.each do |selector|
+ if doc.search(selector).empty?
+ @unused_selectors[selector] += 1
+ end
+end

0 comments on commit 86d7335

Please sign in to comment.