Sha256: b3fab96c4e9fec9592aa6b8c6397c8887e9381c3c906562defae07acc959b291
Contents?: true
Size: 473 Bytes
Versions: 12
Compression:
Stored size: 473 Bytes
Contents
module Trackman module Urls module CssParser @@url ||= /url\(['"]?([^'"\)]+)['"]?\)/ @@import ||= /url\(['"]?[^'"\)]+['"]?\)/ def parse_css value value = value.dup clean_comments value value.scan(@@import).collect{|x| @@url.match(x)[1]}.select{|x| !x.embedded? } end def clean_comments value value.gsub!(/\/\*.*\*\//m, '') value.gsub!(/\<\!\-\-.*\-\-\>/m, '') end end end end
Version data entries
12 entries across 12 versions & 1 rubygems