Sha256: fb694e6b3bf43ae112e7e47b31f903288a4daf76c6509a21a637e886e5b8e1a5

Contents?: true

Size: 308 Bytes

Versions: 9

Compression:

Stored size: 308 Bytes

Contents

module InlineSvg::TransformPipeline::Transformations
  class Title < Transformation
    def transform(doc)
      doc = Nokogiri::XML::Document.parse(doc.to_html)
      node = Nokogiri::XML::Node.new('title', doc)
      node.content = value
      doc.at_css('svg').add_child(node)
      doc
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
inline_svg-0.6.3 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.6.2 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.6.1 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.6.0 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.5.3 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.5.2 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.5.1 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.5.0 lib/inline_svg/transform_pipeline/transformations/title.rb
inline_svg-0.4.0 lib/inline_svg/transform_pipeline/transformations/title.rb