Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Working out a nokogiri idea

  • Loading branch information...
commit 86d73356955d5356e3423582ad4337a3ed87afd4 1 parent 0adb315
Mike Tierney authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 nokogiri_css_search.rb
9 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
Please sign in to comment.
Something went wrong with that request. Please try again.