diff options
author | murphy <murphy@rubychan.de> | 2010-05-01 01:31:56 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-05-01 01:31:56 +0000 |
commit | fa975bbf5d40644d987887b4cf273a3f02612f03 (patch) | |
tree | 5ffada8100c1b6cb9057dec7985daaf6d1851396 /lib/coderay.rb | |
parent | e271dc13633fa6dba9fb87f415d72505af0cc88c (diff) | |
download | coderay-fa975bbf5d40644d987887b4cf273a3f02612f03.tar.gz |
Direct Streaming! See #142 and Changes.textile.
Diffstat (limited to 'lib/coderay.rb')
-rw-r--r-- | lib/coderay.rb | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/coderay.rb b/lib/coderay.rb index 3636714..ef2574a 100644 --- a/lib/coderay.rb +++ b/lib/coderay.rb @@ -8,7 +8,7 @@ # See README. # # It consists mainly of -# * the main engine: CodeRay (Scanners::Scanner, Tokens/TokenStream, Encoders::Encoder), PluginHost +# * the main engine: CodeRay (Scanners::Scanner, Tokens, Encoders::Encoder), PluginHost # * the scanners in CodeRay::Scanners # * the encoders in CodeRay::Encoders # @@ -98,13 +98,6 @@ # CodeRay.encode_tokens:: Encode the given tokens. # CodeRay.encode_file:: Scan a file, guess the language using FileType and encode it. # -# == Streaming -# -# Streaming saves RAM by running Scanner and Encoder in some sort of -# pipe mode; see TokenStream. -# -# CodeRay.scan_stream:: Scan in stream mode. -# # == All-in-One Encoding # # CodeRay.encode:: Highlight a string with a given input and output format. @@ -293,21 +286,6 @@ module CodeRay end - # This Exception is raised when you try to stream with something that is not - # capable of streaming. - class NotStreamableError < Exception - - # +obj+ is the object that is not streamable. - def initialize obj - @obj = obj - end - - def to_s # :nodoc: - '%s is not Streamable!' % @obj.class - end - - end - # A dummy module that is included by subclasses of # CodeRay::Scanners::Scanner and CodeRay::Encoders::Encoder # to show that they are able to handle streams. |