Class: BridgetownInlineSvg::RenderOptimizedSvg

Inherits:
RenderSvg
  • Object
show all
Defined in:
lib/bridgetown-inline-svg/render_optimized_svg.rb

Constant Summary collapse

PLUGINS_BLOCKLIST =
[
  SvgOptimizer::Plugins::CleanupId
].freeze
PLUGINS =
SvgOptimizer::DEFAULT_PLUGINS.delete_if { |plugin|
  PLUGINS_BLOCKLIST.include?(plugin)
}

Instance Attribute Summary

Attributes inherited from RenderSvg

#attributes

Instance Method Summary collapse

Methods inherited from RenderSvg

#initialize

Constructor Details

This class inherits a constructor from BridgetownInlineSvg::RenderSvg

Instance Method Details

#callObject



13
14
15
# File 'lib/bridgetown-inline-svg/render_optimized_svg.rb', line 13

def call
  SvgOptimizer.optimize(file, [create_plugin!] + PLUGINS)
end