Class: CodeRay::Scanners::Ruby

Inherits:
Scanner
  • Object
show all
Includes:
CodeRay::Streamable
Defined in:
lib/coderay/scanners/ruby.rb

Overview

This scanner is really complex, since Ruby is a complex language!

It tries to highlight 100% of all common code, and 90% of strange codes.

It is optimized for HTML highlighting, and is not very useful for parsing or pretty printing.

For now, I think it’s better than the scanners in VIM or Syntax, or any highlighter I was able to find, except Caleb’s RubyLexer.

I hope it’s also better than the rdoc/irb lexer.

Defined Under Namespace

Modules: Patterns

Constant Summary collapse

EncodingError =
Class.new Exception

Constants inherited from Scanner

Scanner::DEFAULT_OPTIONS, Scanner::KINDS_NOT_LOC, Scanner::ScanError

Method Summary

Methods inherited from Scanner

#column, #each, file_extension, #initialize, #lang, #line, #marshal_dump, #marshal_load, normify, #reset, streamable?, #streaming?, #string=, #tokenize, #tokens

Methods included from Plugin

#helper, #included, #plugin_host, #plugin_id, #register_for, #title

Constructor Details

This class inherits a constructor from CodeRay::Scanners::Scanner