class CodeRay::Scanners::Scanner

def initialize code = '', options = {}

Else, a Tokens object is used.

overwrite default options here.)
It is merged with the default options of the class (you can
* +options+ is a Hash with Symbols as keys.
StringScanner.
* +code+ is the input String and is handled by the superclass

Create a new Scanner.
def initialize code = '', options = {}
  if self.class == Scanner
    raise NotImplementedError, "I am only the basic Scanner class. I can't scan anything. :( Use my subclasses."
  end
  
  @options = self.class::DEFAULT_OPTIONS.merge options
  
  super self.class.normalize(code)
  
  @tokens = options[:tokens] || Tokens.new
  @tokens.scanner = self if @tokens.respond_to? :scanner=
  
  setup
end