Module: UltraMarathon::Logging::ClassMethods

Defined in:
lib/ultra_marathon/logging.rb

Instance Method Summary collapse

Instance Method Details

#logger_classObject

If the instance variable is callable, the result of invoking that block is set to be the instance variable. Otherwise returns it, defaulting to the included Logger class



22
23
24
25
26
27
28
# File 'lib/ultra_marathon/logging.rb', line 22

def logger_class
  if @logger_class && @logger_class.respond_to?(:call)
    @logger_class = @logger_class.call
  else
    @logger_class ||= Logger
  end
end