Created
February 8, 2012 03:20
-
-
Save dangerouse/1764934 to your computer and use it in GitHub Desktop.
Ruby's macro equivalent
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
module DebuggingMacro | |
if AppConfig.logging.debugging_enabled | |
def debug(msg) | |
puts msg | |
end | |
else | |
def debug(msg); end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment