Class: Rouge::Lexers::PlainText

Inherits:
Rouge::Lexer show all
Defined in:
lib/rouge/lexers/plain_text.rb

Constant Summary

Constants included from Token::Tokens

Token::Tokens::Num, Token::Tokens::Str

Instance Method Summary collapse

Methods inherited from Rouge::Lexer

aliases, all, analyze_text, assert_utf8!, #debug, default_options, demo, demo_file, desc, filenames, find, find_fancy, guess, guess_by_filename, guess_by_mimetype, guess_by_source, guesses, #initialize, lex, #lex, mimetypes, #option, #options, #reset!, tag, #tag

Methods included from Token::Tokens

token

Constructor Details

This class inherits a constructor from Rouge::Lexer

Instance Method Details

#stream_tokens(string) {|self.token, string| ... } ⇒ Object

Yields:



19
20
21
# File 'lib/rouge/lexers/plain_text.rb', line 19

def stream_tokens(string, &b)
  yield self.token, string
end

#tokenObject



15
16
17
# File 'lib/rouge/lexers/plain_text.rb', line 15

def token
  @token ||= Token[option :token]
end