Skip to content

Instantly share code, notes, and snippets.

@rob-murray
Last active July 19, 2024 13:33
Show Gist options
  • Save rob-murray/20d4ecc2183d98182cc369b5e97b8d23 to your computer and use it in GitHub Desktop.
Save rob-murray/20d4ecc2183d98182cc369b5e97b8d23 to your computer and use it in GitHub Desktop.
# 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