Sha256: af9312b02b7afd12b563d1f4527a2e532def6a80737ae6bdf5000323f4a2a710

Contents?: true

Size: 340 Bytes

Versions: 2

Compression:

Stored size: 340 Bytes

Contents

module It
  # Handles replacements in non HTML templates (e.g. mails)
  class Plain < Tag
    def initialize(template = '%s')
      raise TypeError, "expected a String, got #{template.class}" unless template.is_a?(String)

      @template = template
    end

    def process(content = '')
      format(@template, content)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
it-2.0.0 lib/it/plain.rb
it-1.0.0 lib/it/plain.rb