Class CodeRay::Encoders::Text
In: lib/coderay/encoders/text.rb
Parent: Encoder

Methods

finish   setup   token  

Included Modules

Streamable

Constants

FILE_EXTENSION = 'txt'
DEFAULT_OPTIONS = { :separator => ''

Protected Instance methods

[Source]

    # File lib/coderay/encoders/text.rb, line 25
25:     def finish options
26:       @out.chomp @sep
27:     end

[Source]

    # File lib/coderay/encoders/text.rb, line 16
16:     def setup options
17:       @out = ''
18:       @sep = options[:separator]
19:     end

[Source]

    # File lib/coderay/encoders/text.rb, line 21
21:     def token text, kind
22:       @out << text + @sep if text.is_a? ::String
23:     end

[Validate]