CodeRay::Encoders::Text

Concats the tokens into a single string, resulting in the original code string if no tokens were removed.

Alias: plain, plaintext

Options

:separator

A separator string to join the tokens.

Default: empty String

Constants

FILE_EXTENSION
DEFAULT_OPTIONS

Public Instance Methods

text_token(text, kind) click to toggle source
    # File lib/coderay/encoders/text.rb, line 25
25:     def text_token text, kind
26:       super
27:       
28:       if @first
29:         @first = false
30:       else
31:         @out << @sep
32:       end if @sep
33:     end

Protected Instance Methods

setup(options) click to toggle source
    # File lib/coderay/encoders/text.rb, line 36
36:     def setup options
37:       super
38:       
39:       @first = true
40:       @sep = options[:separator]
41:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.