Class: CodeRay::Scanners::Ruby

Inherits:
Scanner
  • Object
show all
Defined in:
lib/coderay/scanners/ruby.rb,
lib/coderay/scanners/ruby/string_state.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.

Defined Under Namespace

Modules: Patterns Classes: StringState

Constant Summary

Constants inherited from Scanner

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

Instance Attribute Summary

Attributes inherited from Scanner

#state

Attributes included from Plugin

#plugin_id

Instance Method Summary collapse

Methods inherited from Scanner

#binary_string, #column, #each, encoding, file_extension, #file_extension, #initialize, #lang, lang, #line, normalize, #reset, #string=, #tokenize, #tokens

Methods included from Plugin

#aliases, #plugin_host, #register_for, #title

Constructor Details

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

Instance Method Details

#interpreted_string_stateObject



19
20
21
# File 'lib/coderay/scanners/ruby.rb', line 19

def interpreted_string_state
  StringState.new :string, true, '"'
end