module Ansible::Output
Public Class Methods
to_html(ansi, stream='')
click to toggle source
Generate HTML for an output string formatted with ANSI escape sequences representing colours and styling @param ansi [String] an output string formatted with escape sequences to represent formatting @param stream [String] a stream or string (that supports +<<+) to which generated HTML will be appended @return the stream provided or a new String @example List hosts with an inline inventory that only contains localhost
to_html "\e[90mGrey\e[0m" => '<span style="color: grey;">Grey</span>'
# File lib/ansible/output.rb, line 13 def self.to_html(ansi, stream='') Ansi2Html.new(ansi).to_html stream end