Sha256: ddaeb5a648aa5aca7029fc98a7d07080ab6d7b79e1607bf3eaba04cb66f609a9
Contents?: true
Size: 794 Bytes
Versions: 3
Compression:
Stored size: 794 Bytes
Contents
require 'awesome_print' module Hieracles module Outputs # format accepting colors # for display in the terminal class Console include Hieracles::Utils COLORS = [ "\e[31m%s\e[0m", "\e[32m%s\e[0m", "\e[33m%s\e[0m", "\e[34m%s\e[0m", "\e[35m%s\e[0m", "\e[37m%s\e[0m", "\e[38m%s\e[0m", "\e[36m%s\e[0m", "\e[97m%s\e[0m", "\e[35;1m%s\e[0m" ] def initialize() @colors = {} end def hash_list(headers, hash) back = "\n" if headers.count > 0 notifications.each do |v| back << format("#{COLORS[9]}\n", "*** #{v.source}: #{v.message} ***") end back << "\n" end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hieracles-0.4.2 | lib/hieracles/outputs/console.rb |
hieracles-0.4.1 | lib/hieracles/outputs/console.rb |
hieracles-0.4.0 | lib/hieracles/outputs/console.rb |