Module: Trackman::Urls::CssParser
- Included in:
- Assets::CssAsset, HtmlParser
- Defined in:
- lib/trackman/urls/css_parser.rb
Instance Method Summary collapse
Instance Method Details
#clean_comments(value) ⇒ Object
13 14 15 16 |
# File 'lib/trackman/urls/css_parser.rb', line 13 def clean_comments value value.gsub!(/\/\*.*\*\//m, '') value.gsub!(/\<\!\-\-.*\-\-\>/m, '') end |
#parse_css(value) ⇒ Object
7 8 9 10 11 |
# File 'lib/trackman/urls/css_parser.rb', line 7 def parse_css value value = value.dup clean_comments value value.scan(@@import).collect{|x| @@url.match(x)[1]}.select{|x| !x. } end |