-
-
Save solars/f9d93b1929bd95e3845107d2814a8f52 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
module MyWrapper | |
module ClassMethods | |
def error | |
puts 'test' | |
end | |
end | |
def self.prepended(base) | |
class << base | |
prepend ClassMethods | |
end | |
end | |
end | |
class Log4r::Logger | |
prepend MyWrapper | |
end | |
Rails.logger.error "test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment