Sha256: 311ac6c2298ca4867f16345bac925dc4521c778b7e27c99ac5168a8dcfbb253c
Contents?: true
Size: 1.16 KB
Versions: 44
Compression:
Stored size: 1.16 KB
Contents
module CMSScanner module Formatter # CLI Formatter class Cli < Base # @return [ String ] def info_icon green('[+]') end # @return [ String ] def notice_icon blue('[i]') end # @return [ String ] def warning_icon amber('[!]') end # @return [ String ] def critical_icon red('[!]') end # @param [ String ] text # @return [ String ] def bold(text) colorize(text, 1) end # @param [ String ] text # @return [ String ] def red(text) colorize(text, 31) end # @param [ String ] text # @return [ String ] def green(text) colorize(text, 32) end # @param [ String ] text # @return [ String ] def amber(text) colorize(text, 33) end # @param [ String ] text # @return [ String ] def blue(text) colorize(text, 34) end # @param [ String ] text # @param [ Integer ] color_code # @return [ String ] def colorize(text, color_code) "\e[#{color_code}m#{text}\e[0m" end end end end
Version data entries
44 entries across 44 versions & 1 rubygems