Permalink
Browse files

Document the way BufferedLogger defines its methods.

  • Loading branch information...
1 parent 7324e46 commit 358ed90fe52f3cf89f1aaf22ae07695b06bbbe1a @FooBarWidget FooBarWidget committed May 24, 2009
Showing with 4 additions and 0 deletions.
  1. +4 −0 activesupport/lib/active_support/buffered_logger.rb
@@ -68,6 +68,10 @@ def add(severity, message = nil, progname = nil, &block)
message
end
+ # Dynamically add methods such as:
+ # def info
+ # def warn
+ # def debug
for severity in Severity.constants
class_eval <<-EOT, __FILE__, __LINE__ + 1
def #{severity.downcase}(message = nil, progname = nil, &block) # def debug(message = nil, progname = nil, &block)

0 comments on commit 358ed90

Please sign in to comment.