summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/count.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/encoders/count.rb')
-rw-r--r--lib/coderay/encoders/count.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/coderay/encoders/count.rb b/lib/coderay/encoders/count.rb
index c9a6dfd..2e60a89 100644
--- a/lib/coderay/encoders/count.rb
+++ b/lib/coderay/encoders/count.rb
@@ -1,12 +1,15 @@
module CodeRay
module Encoders
-
+
+ # Returns the number of tokens.
+ #
+ # Text and block tokens (:open etc.) are counted.
class Count < Encoder
include Streamable
register_for :count
- protected
+ protected
def setup options
@out = 0
@@ -15,6 +18,7 @@ module Encoders
def token text, kind
@out += 1
end
+
end
end