Class: Rouge::Lexers::Python
- Inherits:
-
RegexLexer
- Object
- Rouge::Lexer
- RegexLexer
- Rouge::Lexers::Python
- Defined in:
- lib/rouge/lexers/python.rb
Class Method Summary collapse
Methods inherited from RegexLexer
[], #get_state, get_state, #initialize, state, states, #step, #stream_tokens, #stream_with_state
Methods inherited from Rouge::Lexer
aliases, #debug, default_options, filenames, find, #get_tokens, guess, guess_by_filename, guess_by_mimetype, guess_by_source, #initialize, lex, #lex, make, mimetypes, new, #option, #options, register, #stream_tokens, tag
Constructor Details
This class inherits a constructor from Rouge::RegexLexer
Class Method Details
.analyze_text(text) ⇒ Object
9 10 11 |
# File 'lib/rouge/lexers/python.rb', line 9 def self.analyze_text(text) return 1 if text.shebang?(/pythonw?(3|2(\.\d)?)?/) end |