summaryrefslogtreecommitdiffstats
path: root/vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/yaml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/yaml.rb')
-rw-r--r--vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/yaml.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/yaml.rb b/vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/yaml.rb
new file mode 100644
index 000000000..5564e58a4
--- /dev/null
+++ b/vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/yaml.rb
@@ -0,0 +1,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