# File lib/phusion_passenger/utils/ansi_colors.rb, line 40 def self.included(klass) # When included into another class, make sure that Utils # methods are made private. public_instance_methods(false).each do |method_name| klass.send(:private, method_name) end end
# File lib/phusion_passenger/utils/ansi_colors.rb, line 48 def ansi_colorize(text) text = text.gsub(%{<b>(.*?)</b>}, "#{BOLD}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%{<red>(.*?)</red>}, "#{BOLD}#{RED}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%{<green>(.*?)</green>}, "#{BOLD}#{GREEN}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%{<yellow>(.*?)</yellow>}, "#{BOLD}#{YELLOW}\\1#{DEFAULT_TERMINAL_COLOR}") text.gsub!(%{<banner>(.*?)</banner>}, "#{BOLD}#{BLUE_BG}#{YELLOW}\\1#{DEFAULT_TERMINAL_COLOR}") return text end
Generated with the Darkfish Rdoc Generator 2.