diff options
author | murphy <murphy@rubychan.de> | 2006-07-11 05:40:21 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-07-11 05:40:21 +0000 |
commit | 7bb2aef0553091a10c197e302475c9f14de8a860 (patch) | |
tree | 72ea9444276fe97dc99ae82aa9e46070ec7ba9ea /lib/coderay/duo.rb | |
parent | 26a8e5a0388199ac686db28d631b05a5b5aa02e1 (diff) | |
download | coderay-7bb2aef0553091a10c197e302475c9f14de8a860.tar.gz |
rake test now runs in debug mode.
All .rb files converted to UNIX format (where did the \r come from?)
Diffstat (limited to 'lib/coderay/duo.rb')
-rw-r--r-- | lib/coderay/duo.rb | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/lib/coderay/duo.rb b/lib/coderay/duo.rb index 3125568..0e5956e 100644 --- a/lib/coderay/duo.rb +++ b/lib/coderay/duo.rb @@ -1,29 +1,29 @@ -module CodeRay
-
- # = Duo
- #
- # $Id: scanner.rb 123 2006-03-21 14:46:34Z murphy $
- #
- # TODO: Doc.
- class Duo
-
- attr_accessor :scanner, :encoder
-
- def initialize lang, format, options = {}
- @scanner = CodeRay.scanner lang, CodeRay.get_scanner_options(options)
- @encoder = CodeRay.encoder format, options
- end
-
- class << self
- alias [] new
- end
-
- def encode code
- @scanner.string = code
- @encoder.encode_tokens(scanner.tokenize)
- end
- alias highlight encode
-
- end
-
-end
+module CodeRay + + # = Duo + # + # $Id: scanner.rb 123 2006-03-21 14:46:34Z murphy $ + # + # TODO: Doc. + class Duo + + attr_accessor :scanner, :encoder + + def initialize lang, format, options = {} + @scanner = CodeRay.scanner lang, CodeRay.get_scanner_options(options) + @encoder = CodeRay.encoder format, options + end + + class << self + alias [] new + end + + def encode code + @scanner.string = code + @encoder.encode_tokens(scanner.tokenize) + end + alias highlight encode + + end + +end |