Class: CodeRay::Scanners::Plaintext

Inherits:
Scanner
  • Object
show all
Includes:
CodeRay::Streamable
Defined in:
vendor/plugins/coderay-0.9.2/lib/coderay/scanners/plaintext.rb

Constant Summary

KINDS_NOT_LOC =
[:plain]

Constants inherited from Scanner

DEFAULT_OPTIONS, KINDS_NOT_LOC, ScanError

Instance Method Summary

Methods inherited from Scanner

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

Methods included from CodeRay::Plugin

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

Constructor Details

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

Instance Method Details

- (Object) scan_tokens(tokens, options)



13
14
15
16
# File 'vendor/plugins/coderay-0.9.2/lib/coderay/scanners/plaintext.rb', line 13

def scan_tokens tokens, options
  text = (scan_until(/\z/) || '')
  tokens << [text, :plain]
end