Sha256: f5a30e5a0428154cc11299d46e86cc139217e502b4652f61e906ba480020f9e4

Contents?: true

Size: 387 Bytes

Versions: 5

Compression:

Stored size: 387 Bytes

Contents

require 'semlogr/templates/text_token'

module Semlogr
  module Templates
    class Template
      attr_accessor :tokens

      def initialize(tokens)
        @tokens = tokens
      end

      def render(output, properties)
        @tokens.each do |token|
          token.render(output, properties)
        end
      end

      EMPTY = Template.new([TextToken::EMPTY])
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
semlogr-0.2.0 lib/semlogr/templates/template.rb
semlogr-0.1.3 lib/semlogr/templates/template.rb
semlogr-0.1.2 lib/semlogr/templates/template.rb
semlogr-0.1.1 lib/semlogr/templates/template.rb
semlogr-0.1.0 lib/semlogr/templates/template.rb