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/encoders/tokens.rb | 88 +++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'lib/coderay/encoders/tokens.rb') diff --git a/lib/coderay/encoders/tokens.rb b/lib/coderay/encoders/tokens.rb index 743cc0e..2428589 100644 --- a/lib/coderay/encoders/tokens.rb +++ b/lib/coderay/encoders/tokens.rb @@ -1,44 +1,44 @@ -module CodeRay -module Encoders - - # The Tokens encoder converts the tokens to a simple - # readable format. It doesn't use colors and is mainly - # intended for console output. - # - # The tokens are converted with Tokens.write_token. - # - # The format is: - # - # \t \n - # - # Example: - # - # require 'coderay' - # puts CodeRay.scan("puts 3 + 4", :ruby).tokens - # - # prints: - # - # ident puts - # space - # integer 3 - # space - # operator + - # space - # integer 4 - # - class Tokens < Encoder - - include Streamable - register_for :tokens - - FILE_EXTENSION = 'tok' - - protected - def token *args - @out << CodeRay::Tokens.write_token(*args) - end - - end - -end -end +module CodeRay +module Encoders + + # The Tokens encoder converts the tokens to a simple + # readable format. It doesn't use colors and is mainly + # intended for console output. + # + # The tokens are converted with Tokens.write_token. + # + # The format is: + # + # \t \n + # + # Example: + # + # require 'coderay' + # puts CodeRay.scan("puts 3 + 4", :ruby).tokens + # + # prints: + # + # ident puts + # space + # integer 3 + # space + # operator + + # space + # integer 4 + # + class Tokens < Encoder + + include Streamable + register_for :tokens + + FILE_EXTENSION = 'tok' + + protected + def token *args + @out << CodeRay::Tokens.write_token(*args) + end + + end + +end +end -- cgit v1.2.1