summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/yaml.rb
blob: 4e2b7a1981686cc39371f9db620f93dd9276b4e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module CodeRay
	module Encoders

		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