Sha256: 5f3dc5bbe05df85ca874032c2cbd2c8980a156120e9356653c9951a1a4d9617f

Contents?: true

Size: 278 Bytes

Versions: 4

Compression:

Stored size: 278 Bytes

Contents

module It
  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)
      sprintf(@template, content)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
it-0.2.5 lib/it/plain.rb
it-0.2.4 lib/it/plain.rb
it-0.2.3 lib/it/plain.rb
it-0.2.1 lib/it/plain.rb