lib/rouge/guesser.rb in rouge-2.0.2 vs lib/rouge/guesser.rb in rouge-2.0.3

- old
+ new

@@ -1,6 +1,15 @@ module Rouge class Guesser + class Ambiguous < StandardError + attr_reader :alternatives + def initialize(alternatives); @alternatives = alternatives; end + + def message + "Ambiguous guess: can't decide between #{alternatives.map(&:tag).inspect}" + end + end + def self.guess(guessers, lexers) original_size = lexers.size guessers.each do |g| new_lexers = case g