Class: SeeLessEssEss::Extractor::Collector
- Inherits:
-
Nokogiri::XML::SAX::Document
- Object
- Nokogiri::XML::SAX::Document
- SeeLessEssEss::Extractor::Collector
- Defined in:
- lib/see-less-ess-ess.rb
Instance Method Summary collapse
Instance Method Details
#css_classes ⇒ Object
40 41 42 |
# File 'lib/see-less-ess-ess.rb', line 40 def css_classes @css_classes ||= Set.new end |
#html_tags ⇒ Object
43 44 45 |
# File 'lib/see-less-ess-ess.rb', line 43 def @html_tags ||= Set.new end |
#start_element(tag, attrs = []) ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'lib/see-less-ess-ess.rb', line 46 def start_element(tag, attrs = []) << tag attrs.each do |name, value| if name == "class" css_classes.merge(value.split) end end end |