Permalink
Browse files

keep protected under protected

  • Loading branch information...
mkristian committed May 9, 2010
1 parent 1ee0e31 commit 7fa62db4ba2845f3f6ef90fa6c38ca4d892fdd68
Showing with 14 additions and 2 deletions.
  1. +5 −1 lib/log4r_adapter.rb
  2. +5 −1 lib/logging_adapter.rb
  3. +4 −0 lib/ruby_logger_adapter.rb
View
@@ -4,9 +4,13 @@ class Logger
def initialize(_fullname, _level=nil, _additive=true, _trace=false)
@logger = ::Slf4r::LoggerFacade.new(_fullname)
end
-
+
def method_missing(method, *args, &block)
@logger.send(method, *args, &block) if @logger.respond_to?(method)
end
+
+ def respend_to?(method)
+ @logger.respond_to?(method)
+ end
end
end
View
@@ -8,9 +8,13 @@ def initialize(name)
class << self
alias :[] :new
end
-
+
def method_missing(method, *args, &block)
@logger.send(method, *args, &block) if @logger.respond_to?(method)
end
+
+ def respend_to?(method)
+ @logger.respond_to?(method)
+ end
end
end
@@ -23,4 +23,8 @@ def error(msg, &block)
def method_missing(method, *args, &block)
@logger.send(method, *args, &block) if @logger.respond_to?(method)
end
+
+ def respend_to?(method)
+ @logger.respond_to?(method)
+ end
end

0 comments on commit 7fa62db

Please sign in to comment.