summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/count.rb
blob: d49e0bc6be82a65a73621936827f8ba10d0b6b38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module CodeRay
module Encoders

	class Count < Encoder

		include Streamable
		register_for :count

	protected		
		
		def setup options
			@out = 0
		end
		
		def token text, kind
			@out += 1
		end
	end	

end 
end