diff options
author | murphy <murphy@rubychan.de> | 2010-03-30 01:10:25 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-03-30 01:10:25 +0000 |
commit | 476bc1bfe2f2000acc665f034e7da19bd3f0cc6b (patch) | |
tree | fee024aafe77603a11c8ada56a5165431b1a0789 /lib/coderay.rb | |
parent | 6e01dd000e62f03f9a8e2658bf57b7730677c3f0 (diff) | |
download | coderay-476bc1bfe2f2000acc665f034e7da19bd3f0cc6b.tar.gz |
Renamed token_classes to token_kinds (closes #122).
* *RENAMED* from ClassOfKind. The term "token class" is no longer used in CodeRay. Instead, tokens have _kinds_.
* *RENAMED* TokenKindFilter to TokenClassFilter.
* *ADDED* documentation on encoders affected by the term change.
* *REMOVED* token kinds :attribute_name_fat, :attribute_value_fat, :operator_fat, :tag_fat, and :xml_text.
* *ADDED* token kind :filename.
Diffstat (limited to 'lib/coderay.rb')
-rw-r--r-- | lib/coderay.rb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/coderay.rb b/lib/coderay.rb index df29a5a..3636714 100644 --- a/lib/coderay.rb +++ b/lib/coderay.rb @@ -126,22 +126,23 @@ # If you want to re-use scanners and encoders (because that is faster), see # CodeRay::Duo for the most convenient (and recommended) interface. module CodeRay - + + $CODERAY_DEBUG ||= false + # Version: Major.Minor.Teeny[.Revision] # Major: 0 for pre-stable, 1 for stable # Minor: feature milestone # Teeny: development state, 0 for pre-release # Revision: Subversion Revision number (generated on rake gem:make) - VERSION = '0.9.1' + VERSION = '1.0.0' require 'coderay/tokens' - require 'coderay/token_classes' + require 'coderay/token_kinds' require 'coderay/scanner' require 'coderay/encoder' require 'coderay/duo' require 'coderay/style' - class << self # Scans the given +code+ (a String) with the Scanner for +lang+. @@ -295,16 +296,20 @@ module CodeRay # 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 + + def to_s # :nodoc: '%s is not Streamable!' % @obj.class end + end - # A dummy module that is included by subclasses of CodeRay::Scanner an CodeRay::Encoder + # 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. module Streamable end |