Sha256: 4a86e97eb5db97f6031ceb91bc2d82c3ea079dd5cdb645887144481afe0fecf3

Contents?: true

Size: 633 Bytes

Versions: 2

Compression:

Stored size: 633 Bytes

Contents

module PlantumlBuilder
  module Formats
    class SVG < PlantumlBuilder::Format
      def load
        super
        make_diagram_versionable
        data
      end

      protected

      def format
        'svg'
      end

      def make_diagram_versionable
        self.data = data.split('>')
                        .join(">\n")
                        .gsub(/<!--[\s\S]*?-->/, '') + '>'
      end
    end

    class PNG < PlantumlBuilder::Format
      protected

      def format
        'png'
      end
    end

    class TXT < PlantumlBuilder::Format
      protected

      def format
        'txt'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plantuml_builder-0.3.0 lib/plantuml_builder/formats.rb
plantuml_builder-0.2.0 lib/plantuml_builder/formats.rb