root/vendor/plugins/coderay/lib/coderay/encoders/yaml.rb

Download in other formats: Raw | Text
Revisions
Dimitrij Denissenko
Dimitrij Denissenko
Apr 16 2009 * 08:19
(over 1 year ago)

Revision 54efc5ab9af13f205a61956b1ccf127dfc056aae

Added Ruby 1.9 compatibility / Replaced CodeRay with new Version / Updated specs

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