comparison vendor/plugins/coderay-0.9.2/lib/coderay/encoders/text.rb @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:513646585e45
1 module CodeRay
2 module Encoders
3
4 class Text < Encoder
5
6 include Streamable
7 register_for :text
8
9 FILE_EXTENSION = 'txt'
10
11 DEFAULT_OPTIONS = {
12 :separator => ''
13 }
14
15 protected
16 def setup options
17 super
18 @sep = options[:separator]
19 end
20
21 def text_token text, kind
22 text + @sep
23 end
24
25 def finish options
26 super.chomp @sep
27 end
28
29 end
30
31 end
32 end