Sha256: 9491e5c704d6ae4925cf9553fa6e5db17bc6d4e2a625c74ad28d7e805d0c2d2e
Contents?: true
Size: 642 Bytes
Versions: 91
Compression:
Stored size: 642 Bytes
Contents
# frozen_string_literal: true module GeneratorMessages class << self def output @output ||= [] end def add_error(message) output << format_error(message) end def add_warning(message) output << format_warning(message) end def add_info(message) output << format_info(message) end def messages output end def format_error(msg) Rainbow("ERROR: #{msg}").red end def format_warning(msg) Rainbow("WARNING: #{msg}").orange end def format_info(msg) Rainbow(msg.to_s).green end def clear @output = [] end end end
Version data entries
91 entries across 91 versions & 1 rubygems