A rule is a tuple of a regular expression to test, and a callback to perform if the test succeeds.
# File lib/rouge/regex_lexer.rb, line 15 def initialize(re, callback) @re = re @callback = callback @beginning_of_line = re.source[0] == ^ end
# File lib/rouge/regex_lexer.rb, line 21 def inspect "#<Rule #{@re.inspect}>" end