Module: ActiveAttr::Logger
Overview
Provides access to a configurable logger in model classes and instances
Class Method Summary collapse
-
.logger ⇒ nil, Object
The global default logger.
-
.logger=(new_logger) ⇒ Object
Configure the global default logger.
-
.logger? ⇒ Boolean
Determine if a global default logger is configured.
Class Method Details
.logger ⇒ nil, Object
The global default logger
21 22 23 |
# File 'lib/active_attr/logger.rb', line 21 def self.logger @logger ||= nil end |
.logger=(new_logger) ⇒ Object
Configure the global default logger
30 31 32 |
# File 'lib/active_attr/logger.rb', line 30 def self.logger=(new_logger) @logger = new_logger end |
.logger? ⇒ Boolean
Determine if a global default logger is configured
37 38 39 |
# File 'lib/active_attr/logger.rb', line 37 def self.logger? !!logger end |