Class: DragonflySvg::Processors::RemoveNamespaces
- Inherits:
-
Object
- Object
- DragonflySvg::Processors::RemoveNamespaces
- Defined in:
- lib/dragonfly_svg/processors/remove_namespaces.rb
Instance Method Summary collapse
Instance Method Details
#call(content) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/dragonfly_svg/processors/remove_namespaces.rb', line 6 def call(content) raise UnsupportedFormat unless content.ext raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext.downcase) doc = Nokogiri::XML(content.data) doc.remove_namespaces! content.update(doc.to_xml, 'name' => 'temp.svg') end |