Class: SvgOptimizer::Plugins::RemoveEmptyAttribute
- Defined in:
- lib/svg_optimizer/plugins/remove_empty_attribute.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from SvgOptimizer::Plugins::Base
Instance Method Details
#process ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/svg_optimizer/plugins/remove_empty_attribute.rb', line 6 def process xml.xpath("//*[@*='']").each do |node| node.attributes.each do |name, _| remove_if_empty node, name end end end |