Module: NutritionCalculator::HasLogging

Defined in:
lib/nutrition_calculator/has_logging.rb

Overview

Provides a few logging utilities to the including class/module

Instance Attribute Summary collapse

Instance Attribute Details

#loggerLogger

The logger to which the including class/module should write

Defaults to a NullLogger, which simply discards all logging attempts as noops.

Returns:

  • (Logger)

    an object adhering to the Logger interface



25
26
27
# File 'lib/nutrition_calculator/has_logging.rb', line 25

def logger
  @logger ||= NullLogger
end