Class: MediaWikiLexer::LexerTable

Inherits:
Object
  • Object
show all
Defined in:
lib/mediacloth/mediawikilexer.rb

Instance Method Summary collapse

Constructor Details

#initializeLexerTable

Returns a new instance of LexerTable.



1090
1091
1092
# File 'lib/mediacloth/mediawikilexer.rb', line 1090

def initialize
  @tables = []
end

Instance Method Details

#[](char) ⇒ Object



1104
1105
1106
# File 'lib/mediacloth/mediawikilexer.rb', line 1104

def[] (char)
  @table[char]
end

#popObject



1099
1100
1101
1102
# File 'lib/mediacloth/mediawikilexer.rb', line 1099

def pop
  @tables.pop
  @table = @tables.last
end

#push(table) ⇒ Object



1094
1095
1096
1097
# File 'lib/mediacloth/mediawikilexer.rb', line 1094

def push(table)
  @tables << table
  @table = table
end