Skip to content

Instantly share code, notes, and snippets.

@chendo
Created August 9, 2010 16:48
Show Gist options
  • Select an option

  • Save chendo/515692 to your computer and use it in GitHub Desktop.

Select an option

Save chendo/515692 to your computer and use it in GitHub Desktop.
# Counts CSS selectors for a file
File.read('public/stylesheets/ranger2.css').gsub(%r{/\*.*?\*/}m, '').split(/\{.*?\}/m).map { |s| s.strip.split(/,/) }.flatten.size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment