Redmine/vendor/plugins/coderay-0.7.6.227/lib/coderay/encoders/count.rb

22 lines
230 B
Ruby

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