view vendor/gems/coderay-0.9.7/lib/coderay/encoders/.svn/text-base/count.rb.svn-base @ 726:386fcfd7459f feature_14

Merge from branch "luisf"
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 24 Oct 2011 15:28:29 +0100
parents 0579821a129a
children
line wrap: on
line source
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