blob: 80aec57489d82a1055eecb8be0a2476c195c32b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
module CodeRay
module Encoders
class Count < Encoder
register_for :count
protected
def setup options
@out = 0
end
def token text, kind
@out += 1
end
end
end
end
|