From 7bb2aef0553091a10c197e302475c9f14de8a860 Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 11 Jul 2006 05:40:21 +0000 Subject: rake test now runs in debug mode. All .rb files converted to UNIX format (where did the \r come from?) --- lib/coderay/duo.rb | 58 +++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'lib/coderay/duo.rb') 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 -- cgit v1.2.1