Last active
July 19, 2024 13:33
-
-
Save rob-murray/20d4ecc2183d98182cc369b5e97b8d23 to your computer and use it in GitHub Desktop.
This file contains 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
# frozen_string_literal: true | |
# rubocop:disable | |
def puts_here(stuff = nil) | |
black_background_white_text = "\e[30;47m" | |
reset = "\e[0m" | |
puts([black_background_white_text, "*" * 20, self.class.name, "---", caller(1..1).first, "*" * 20, reset].join(" ")) | |
if block_given? | |
yield | |
end | |
puts(stuff) if stuff | |
puts([black_background_white_text, "_" * 20, self.class.name, "---", caller(1..1).first, "_" * 20, reset].join(" ")) | |
end | |
# rubocop:enable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment