Skip to content

Instantly share code, notes, and snippets.

@solars

solars/test.rb Secret

Last active July 26, 2016 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solars/f9d93b1929bd95e3845107d2814a8f52 to your computer and use it in GitHub Desktop.
Save solars/f9d93b1929bd95e3845107d2814a8f52 to your computer and use it in GitHub Desktop.
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