summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/yaml.rb
blob: b8426476b2024d6828d266207a61b5989897bb3f (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