class Bundler::Thor::Shell::HTML


Bundler::Thor::Shell::Basic to see all available methods.
Inherit from Bundler::Thor::Shell::Basic and add set_color behavior. Check

def ask(statement, color = nil)

TODO: Implement #ask for Bundler::Thor::Shell::HTML

ask("What is your name?")
==== Example

Ask something to the user and receives a response.
def ask(statement, color = nil)
  raise NotImplementedError, "Implement #ask for Bundler::Thor::Shell::HTML"
end

def can_display_colors?

def can_display_colors?
  true
end

def set_color(string, *colors)


of the returned String.
on Highline implementation and it automatically appends CLEAR to the end
option is set to true, it also adds bold to the string. This is based
Set color by using a string or one of the defined constants. If a third
def set_color(string, *colors)
  if colors.all? { |color| color.is_a?(Symbol) || color.is_a?(String) }
    html_colors = colors.map { |color| lookup_color(color) }
    "<span style=\"#{html_colors.join('; ')};\">#{Bundler::Thor::Util.escape_html(string)}</span>"
  else
    color, bold = colors
    html_color = self.class.const_get(color.to_s.upcase) if color.is_a?(Symbol)
    styles = [html_color]
    styles << BOLD if bold
    "<span style=\"#{styles.join('; ')};\">#{Bundler::Thor::Util.escape_html(string)}</span>"
  end
end