Class: SvgOptimizer::Plugins::RemoveRasterImage

Inherits:
Base
  • Object
show all
Defined in:
lib/svg_optimizer/plugins/remove_raster_image.rb

Constant Summary collapse

SELECTOR =
%w[
  image[xlink|href$='.jpg']
  image[xlink|href$='.jpeg']
  image[xlink|href$='.gif']
  image[xlink|href$='.png']
].join(", ")

Instance Attribute Summary

Attributes inherited from Base

#xml

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from SvgOptimizer::Plugins::Base

Instance Method Details

#processObject



13
14
15
# File 'lib/svg_optimizer/plugins/remove_raster_image.rb', line 13

def process
  xml.css(SELECTOR).remove
end