summaryrefslogtreecommitdiffstats
path: root/vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/yaml.rb
blob: 5564e58a47919bb2d7ba310f8130f64adde873cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module CodeRay
module Encoders

  # = YAML Encoder
  #
  # Slow.
  class YAML < Encoder

    register_for :yaml

    FILE_EXTENSION = 'yaml'

  protected
    def compile tokens, options
      require 'yaml'
      @out = tokens.to_a.to_yaml
    end

  end

end
end