Class CodeRay::Encoders::YAML
In: lib/coderay/encoders/yaml.rb
Parent: Encoder

YAML Encoder

Slow.

Methods

Constants

FILE_EXTENSION = 'yaml'

Public Instance methods

[Source]

    # File lib/coderay/encoders/yaml.rb, line 31
31:     def begin_group kind
32:       @data << [:begin_group, kind]
33:     end

[Source]

    # File lib/coderay/encoders/yaml.rb, line 39
39:     def begin_line kind
40:       @data << [:begin_line, kind]
41:     end

[Source]

    # File lib/coderay/encoders/yaml.rb, line 35
35:     def end_group kind
36:       @data << [:end_group, kind]
37:     end

[Source]

    # File lib/coderay/encoders/yaml.rb, line 43
43:     def end_line kind
44:       @data << [:end_line, kind]
45:     end

[Source]

    # File lib/coderay/encoders/yaml.rb, line 27
27:     def text_token text, kind
28:       @data << [text, kind]
29:     end

Protected Instance methods

[Source]

    # File lib/coderay/encoders/yaml.rb, line 22
22:     def finish options
23:       output ::YAML.dump(@data)
24:     end

[Source]

    # File lib/coderay/encoders/yaml.rb, line 16
16:     def setup options
17:       super
18:       
19:       @data = []
20:     end

[Validate]