Sha256: 83271eb67842dc63caec64566515801e3dc1060baa3e58d11a881be820a04714

Contents?: true

Size: 428 Bytes

Versions: 20

Compression:

Stored size: 428 Bytes

Contents

module InlineSvg
  module TransformPipeline
    def self.generate_html_from(svg_file, transform_params)
      document = Nokogiri::XML::Document.parse(svg_file)
      Transformations.lookup(transform_params).reduce(document) do |doc, transformer|
        transformer.transform(doc)
      end.to_html
    end
  end
end

require 'nokogiri'
require 'inline_svg/id_generator'
require 'inline_svg/transform_pipeline/transformations'

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
inline_svg-1.9.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.8.0 lib/inline_svg/transform_pipeline.rb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/inline_svg-1.7.2/lib/inline_svg/transform_pipeline.rb
inline_svg-1.7.2 lib/inline_svg/transform_pipeline.rb
inline_svg-1.7.1 lib/inline_svg/transform_pipeline.rb
inline_svg-1.7.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.6.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.5.2 lib/inline_svg/transform_pipeline.rb
inline_svg-1.5.1 lib/inline_svg/transform_pipeline.rb
inline_svg-1.5.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.4.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.3.1 lib/inline_svg/transform_pipeline.rb
inline_svg-1.3.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.2.3 lib/inline_svg/transform_pipeline.rb
inline_svg-1.2.2 lib/inline_svg/transform_pipeline.rb
inline_svg-1.2.1 lib/inline_svg/transform_pipeline.rb
inline_svg-1.2.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.1.0 lib/inline_svg/transform_pipeline.rb
inline_svg-1.0.1 lib/inline_svg/transform_pipeline.rb
inline_svg-1.0.0 lib/inline_svg/transform_pipeline.rb