Sha256: 4d23828d1387aee4454f957f6d8cc3e80203ea94a279f5b11c5c29a88ddcbf06

Contents?: true

Size: 313 Bytes

Versions: 15

Compression:

Stored size: 313 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.at_css('svg').add_child(node)
      doc
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
inline_svg-0.10.0 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.9.1 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.9.0 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.8.0 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.7.0 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.6.4 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.6.3 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.6.2 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.6.1 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.6.0 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.5.3 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.5.2 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.5.1 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.5.0 lib/inline_svg/transform_pipeline/transformations/description.rb
inline_svg-0.4.0 lib/inline_svg/transform_pipeline/transformations/description.rb