smart_logger_wrapper 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c8ddd160c2ce65d59bc832aca8b0aa4c16294be
4
- data.tar.gz: 1943139dbae45139e9bcc690cf095f45ed252625
3
+ metadata.gz: f193215b0f2007b0861602a5169acd5b6f4fe8a2
4
+ data.tar.gz: c6a426240e52e5f6d24fbfbe9151288f19115b57
5
5
  SHA512:
6
- metadata.gz: ea9d1354d530b8a45e82b0421225a13a3ba7a794026c3072b914e7f094913285e29160e68a94521c742e05c6598db461b962a45a9d377a6b95c891de53aa089d
7
- data.tar.gz: 29256c2b98a5826d298abb908dba83c37d017dcc854ee3c934c3e1b18e106e8f8128ec98c5b1a47f459462cb92c21d06611fd6fe10182fbeaddd7d7c065daf52
6
+ metadata.gz: 4545b47f0bc02df95cbc5699ae8243990851b894fd17569705b31d2a0369d95f0a6c02603f9e61c7ba3a5eb5dc3d85ace00b700e23aab555ac87a5352a623e86
7
+ data.tar.gz: 45f5c6e4014e62913bba562bc61ed4b6da304ca091c53f0d08dbd274bf8f780a782c03917868a405849e4f4ec02b539dd0dcd8fa5ad0b8445a51dbc105426dff
@@ -1,3 +1,3 @@
1
1
  class SmartLoggerWrapper
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -73,15 +73,16 @@ class SmartLoggerWrapper
73
73
 
74
74
  def method_missing(method_name, *args, &block)
75
75
  if Options.defined_option?(method_name)
76
- # if there is an defined option with the same name as the method name, return a new logger with the option.
76
+ # If there is an defined option with the same name as the method name, return a new logger with the option.
77
77
  new_logger = self.class.new(*loggers, **options.merge(method_name => args.first))
78
78
  return block.(new_logger) if block_given?
79
79
  new_logger
80
80
  else
81
- # otherwise, call the method of the warpped logger.
82
- loggers.each do |logger|
81
+ # Otherwise, call the method of the warpped logger.
82
+ # The reutrn value is that of the first one.
83
+ loggers.map do |logger|
83
84
  logger.public_send(method_name, *args, &block)
84
- end
85
+ end.first
85
86
  end
86
87
  end
87
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_logger_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akihiro Katsura