Method: Vagrant::UI::Colored#format_message
- Defined in:
- lib/vagrant/ui.rb
#format_message(type, message, opts = nil) ⇒ Object
This is called by say
to format the message for output.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/vagrant/ui.rb', line 151 def (type, , opts=nil) # Get the format of the message before adding color. = super # Colorize the message if there is a color for this type of message, # either specified by the options or via the default color map. if opts.has_key?(:color) color = COLORS[opts[:color]] = "#{color}#{}#{COLORS[:clear]}" else = "#{COLOR_MAP[type]}#{}#{COLORS[:clear]}" if COLOR_MAP[type] end end |