Mercurial > hg > soundsoftware-site
comparison vendor/gems/coderay-0.9.7/lib/coderay/encoders/yaml.rb @ 523:0b6c82dead28 luisf
Merge from branch "cannam"
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Mon, 25 Jul 2011 14:23:37 +0100 |
parents | 0579821a129a |
children |
comparison
equal
deleted
inserted
replaced
318:f7c525dc7585 | 523:0b6c82dead28 |
---|---|
1 module CodeRay | |
2 module Encoders | |
3 | |
4 # = YAML Encoder | |
5 # | |
6 # Slow. | |
7 class YAML < Encoder | |
8 | |
9 register_for :yaml | |
10 | |
11 FILE_EXTENSION = 'yaml' | |
12 | |
13 protected | |
14 def compile tokens, options | |
15 require 'yaml' | |
16 @out = tokens.to_a.to_yaml | |
17 end | |
18 | |
19 end | |
20 | |
21 end | |
22 end |