Sha256: 9483244055cc46bd8f5951892bf05d0f795e405d1880d783b35b7d62c0ce96b8
Contents?: true
Size: 374 Bytes
Versions: 9
Compression:
Stored size: 374 Bytes
Contents
module InlineSvg::TransformPipeline::Transformations class Description < Transformation def transform(doc) doc = Nokogiri::XML::Document.parse(doc.to_html) node = Nokogiri::XML::Node.new('desc', doc) node.content = value doc.search('svg desc').each { |node| node.remove } doc.at_css('svg').prepend_child(node) doc end end end
Version data entries
9 entries across 9 versions & 1 rubygems