class CodeRay::Encoders::Filter

See also: TokenKindFilter
Default: Tokens.new
The Tokens object which will receive the output.
=== :tokens
== Options
Subclasses of Filter are called “Filters” and can be chained.
It can be subclass to select, remove, or modify tokens in the stream.
A Filter encoder has another Tokens instance as output.

def begin_group kind # :nodoc:

:nodoc:
def begin_group kind  # :nodoc:
  @tokens.begin_group kind
end

def begin_line kind # :nodoc:

:nodoc:
def begin_line kind  # :nodoc:
  @tokens.begin_line kind
end

def end_group kind # :nodoc:

:nodoc:
def end_group kind  # :nodoc:
  @tokens.end_group kind
end

def end_line kind # :nodoc:

:nodoc:
def end_line kind  # :nodoc:
  @tokens.end_line kind
end

def finish options

def finish options
  output @tokens
end

def setup options

def setup options
  super
  
  @tokens = options[:tokens] || Tokens.new
end

def text_token text, kind # :nodoc:

:nodoc:
def text_token text, kind  # :nodoc:
  @tokens.text_token text, kind
end