Created
October 17, 2022 22:41
-
-
Save sephraim/ca5b9a49d66353afaab9337c4030f3bc to your computer and use it in GitHub Desktop.
[Create an anonymous class]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize | |
# | |
# @return [void] | |
def initialize | |
# Setup a simple logger for running locally (if full $logger not available) | |
$logger ||= Class.new do | |
# Print info message | |
# | |
# @param msg [String] Message to print | |
# @return [void] | |
def info(msg) | |
puts "INFO: #{msg}" | |
end | |
# Print warning message | |
# | |
# @param msg [String] Message to print | |
# @return [void] | |
def warn(msg) | |
puts "WARN: #{msg}" | |
end | |
end.new | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment