Module: Climatic::Logger::Wrapper

Defined in:
lib/climatic/logger/wrapper.rb

Instance Method Summary collapse

Instance Method Details

#puts_and_logs(*args, **options) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/climatic/logger/wrapper.rb', line 5

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