Sha256: b57ec86831b43aea999c3979b65afd17c48b9d2b6ade65811918dc8083367ea6
Contents?: true
Size: 429 Bytes
Versions: 14
Compression:
Stored size: 429 Bytes
Contents
module CodeRay module Encoders class Text < Encoder include Streamable register_for :text FILE_EXTENSION = 'txt' DEFAULT_OPTIONS = { :separator => '' } protected def setup options @out = '' @sep = options[:separator] end def token text, kind @out << text + @sep if text.is_a? ::String end def finish options @out.chomp @sep end end end end
Version data entries
14 entries across 14 versions & 3 rubygems