Sha256: f7f8b1d6ee274a8cef09140a1a3b0dd44fe1cd6d89d9b28341d877f718b0b3de

Contents?: true

Size: 788 Bytes

Versions: 19

Compression:

Stored size: 788 Bytes

Contents

module InlineSvg::TransformPipeline::Transformations
  class Transformation
    def self.create_with_value(value)
      self.new(value)
    end

    attr_reader :value

    def initialize(value)
      @value = value
    end

    def transform(*)
      raise "#transform should be implemented by subclasses of Transformation"
    end
  end

  class NullTransformation < Transformation
    def transform(doc)
      doc
    end
  end
end

module InlineSvg
  class CustomTransformation < InlineSvg::TransformPipeline::Transformations::Transformation
    # Inherit from this class to keep custom transformation class definitions short
    # E.g.
    # class MyTransform < InlineSvg::CustomTransformation
    #   def transform(doc)
    #     # Your code here...
    #   end
    # end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
inline_svg-1.2.1 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-1.2.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-1.1.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-1.0.1 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-1.0.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.12.1 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.12.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.11.1 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.11.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.10.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.9.1 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.9.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.8.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.7.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.6.4 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.6.3 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.6.2 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.6.1 lib/inline_svg/transform_pipeline/transformations/transformation.rb
inline_svg-0.6.0 lib/inline_svg/transform_pipeline/transformations/transformation.rb