module CLIUtils::Messenging
¶ ↑
CLIMessenger Module Outputs color-coordinated messages to a CLI
¶ ↑
Public Class Methods
Public Instance Methods
default_instance()
click to toggle source
#default_instance method
Returns a default instance of LoggerDelegator that delegates to STDOUT only. @return LoggerDelegator
# File lib/cliutils/messenging.rb, line 31 def default_instance stdout_logger = Logger.new(STDOUT) stdout_logger.formatter = proc do |severity, datetime, progname, msg| send(severity.downcase, msg) end LoggerDelegator.new(stdout_logger) end
messenger()
click to toggle source
messenger method
Singleton method to return (or initialize, if needed) a LoggerDelegator. @return LoggerDelegator
# File lib/cliutils/messenging.rb, line 47 def messenger @messenger ||= default_instance end