Sha256: 43210fa24bf6698434d58e95d38e7342dc5349518e23fc9f64b8b180c0834a86

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

require 'set'

require 'mime/types'
require 'svg_optimizer'

module Cooltrainer
  module DistorteD
    class SVG < Image

      SUB_TYPE = 'svg'.freeze

      MIME_TYPES = MIME::Types[/^#{self::MEDIA_TYPE}\/#{self::SUB_TYPE}/, :complete => true].to_set

      def self.optimize(src, dest)
        # TODO: Make optimizations/plugins configurable
        SvgOptimizer.optimize_file(src, dest, SvgOptimizer::DEFAULT_PLUGINS)
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
distorted-0.5.7 lib/distorted/svg.rb