annotate vendor/plugins/coderay-0.9.2/lib/coderay/encoders/yaml.rb @ 864:2465362d1b56 bug_145

Close obsolete branch bug_145
author Chris Cannam
date Wed, 11 May 2011 11:57:41 +0100
parents 513646585e45
children
rev   line source
Chris@0 1 module CodeRay
Chris@0 2 module Encoders
Chris@0 3
Chris@0 4 # = YAML Encoder
Chris@0 5 #
Chris@0 6 # Slow.
Chris@0 7 class YAML < Encoder
Chris@0 8
Chris@0 9 register_for :yaml
Chris@0 10
Chris@0 11 FILE_EXTENSION = 'yaml'
Chris@0 12
Chris@0 13 protected
Chris@0 14 def compile tokens, options
Chris@0 15 require 'yaml'
Chris@0 16 @out = tokens.to_a.to_yaml
Chris@0 17 end
Chris@0 18
Chris@0 19 end
Chris@0 20
Chris@0 21 end
Chris@0 22 end