2 # This backend is just a dummy that isn't actually useful for anything
3 # other than testing purposes.
5 class ColoringBackend < Backend
6 COLORS = ['white', 'red', 'green', 'blue', 'black']
13 text = File.read(file)
15 COLORS.each do |color|
17 while occurance = text.index(color, offset) do
18 (@layers[file] ||= []) << Layer.new((occurance ... occurance + color.length),
19 color, "Found a #{color}", self)
20 offset += (occurance + 1)
28 Augment::BACKENDS['color'] = self