lib/rouge/lexer.rb in rouge-1.3.1 vs lib/rouge/lexer.rb in rouge-1.3.2
- old
+ new
@@ -15,17 +15,10 @@
# @see #lex
def lex(stream, opts={}, &b)
new(opts).lex(stream, &b)
end
- def load_const(const_name, relpath)
- return if Lexers.const_defined?(const_name)
-
- root = Pathname.new(__FILE__).dirname.join('lexers')
- load root.join(relpath)
- end
-
def default_options(o={})
@default_options ||= {}
@default_options.merge!(o)
@default_options
end
@@ -423,8 +416,17 @@
# @param [TextAnalyzer] text
# the text to be analyzed, with a couple of handy methods on it,
# like {TextAnalyzer#shebang?} and {TextAnalyzer#doctype?}
def self.analyze_text(text)
0
+ end
+ end
+
+ module Lexers
+ def self.load_const(const_name, relpath)
+ return if const_defined?(const_name)
+
+ root = Pathname.new(__FILE__).dirname.join('lexers')
+ load root.join(relpath)
end
end
end