diff options
author | murphy <murphy@rubychan.de> | 2006-07-10 00:32:57 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-07-10 00:32:57 +0000 |
commit | 9f4c7ab7553f9be7c9d14da0ba7462ad746c2f5d (patch) | |
tree | 686ee95cc9010314278846936476d1cf0bf04353 /lib/coderay/encoders/tokens.rb | |
parent | 42436798565c36a7d9582fcf587946d273083ab1 (diff) | |
download | coderay-9f4c7ab7553f9be7c9d14da0ba7462ad746c2f5d.tar.gz |
Big re-indenting - no more tabs!
Diffstat (limited to 'lib/coderay/encoders/tokens.rb')
-rw-r--r-- | lib/coderay/encoders/tokens.rb | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/lib/coderay/encoders/tokens.rb b/lib/coderay/encoders/tokens.rb index 2bcca40..743cc0e 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:
- #
- # <token-kind> \t <escaped token-text> \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
+ # 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:
+ #
+ # <token-kind> \t <escaped token-text> \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
+ include Streamable
+ register_for :tokens
- FILE_EXTENSION = 'tok'
+ FILE_EXTENSION = 'tok'
- protected
- def token *args
- @out << CodeRay::Tokens.write_token(*args)
- end
+ protected
+ def token *args
+ @out << CodeRay::Tokens.write_token(*args)
+ end
- end
+ end
end
end
|