lib/climatic/logger/wrapper.rb in climatic-0.2.38 vs lib/climatic/logger/wrapper.rb in climatic-0.2.39
- old
+ new
@@ -1,16 +1,19 @@
module Climatic
module Logger
module Wrapper
- def puts_and_logs(*args, logs_as: :info, check_verbose: true)
+ def puts_and_logs(*args, **options)
+ check_verbose = options.fetch :check_verbose, true
+ logs_as = options.fetch :logs_as, :info
+
if check_verbose
puts *args if Climatic.config[:verbose]
else
puts *args
end
self.send logs_as, *args
end
end
end
-end
\ No newline at end of file
+end