Module: InlineSvg::TransformPipeline
- Defined in:
- lib/inline_svg/transform_pipeline.rb,
lib/inline_svg/transform_pipeline/transformations/no_comment.rb
Defined Under Namespace
Modules: Transformations
Class Method Summary collapse
Class Method Details
.generate_html_from(svg_file, transform_params) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/inline_svg/transform_pipeline.rb', line 3 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.strip end |