# File lib/ap/mixin/action_view.rb, line 8 def self.included(base) unless base.const_defined?(:AP_ANSI_TO_HTML) hash = {} # Build ANSI => HTML color map. [ :gray, :red, :green, :yellow, :blue, :purple, :cyan, :white ].each_with_index do |color, i| hash["\033[1;#{30+i}m"] = color end [ :black, :darkred, :darkgreen, :brown, :navy, :darkmagenta, :darkcyan, :slategray ].each_with_index do |color, i| hash["\033[0;#{30+i}m"] = color end base.const_set(:AP_ANSI_TO_HTML, hash.freeze) end end