Sha256: 8d8f9576b64fcbcde0ba78d77fe916adfa2b1ebbb185ac20b4809fcc2f585ac1

Contents?: true

Size: 517 Bytes

Versions: 3

Compression:

Stored size: 517 Bytes

Contents

module Svgeez
  module Elements
    class SvgElement
      def initialize(source, destination, prefix)
        @source = source
        @destination = destination
        @prefix = prefix
      end

      def build
        %(<svg id="#{@destination.file_id}" xmlns="http://www.w3.org/2000/svg">#{symbol_elements.join}</svg>)
      end

      private

      def symbol_elements
        @source.file_paths.map do |file_path|
          SymbolElement.new(file_path, @prefix).build
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
svgeez-4.1.0 lib/svgeez/elements/svg_element.rb
svgeez-4.0.0 lib/svgeez/elements/svg_element.rb
svgeez-3.2.0 lib/svgeez/elements/svg_element.rb