class Rouge::Lexers::Apache
Public Class Methods
directives()
click to toggle source
self-modifying method that loads the keywords file
# File lib/rouge/lexers/apache.rb, line 15 def self.directives Kernel::load File.join(Lexers::BASE_DIR, 'apache/keywords.rb') directives end
sections()
click to toggle source
# File lib/rouge/lexers/apache.rb, line 20 def self.sections Kernel::load File.join(Lexers::BASE_DIR, 'apache/keywords.rb') sections end
values()
click to toggle source
# File lib/rouge/lexers/apache.rb, line 25 def self.values Kernel::load File.join(Lexers::BASE_DIR, 'apache/keywords.rb') values end
Public Instance Methods
name_for_token(token, tktype)
click to toggle source
# File lib/rouge/lexers/apache.rb, line 30 def name_for_token(token, tktype) if self.class.sections.include? token tktype elsif self.class.directives.include? token tktype elsif self.class.values.include? token tktype else Text end end