Module: SemanticLogger::Loggable
- Defined in:
- lib/semantic_logger/loggable.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#logger ⇒ Object
Also make the logger available as an instance method MixIn.
Class Method Details
.included(base) ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/semantic_logger/loggable.rb', line 30 def self.included(base) base.class_eval do # Thread safe class variable initialization include SyncAttr sync_cattr_reader :logger do SemanticLogger::Logger.new(self) end end end |
Instance Method Details
#logger ⇒ Object
Also make the logger available as an instance method MixIn
42 43 44 |
# File 'lib/semantic_logger/loggable.rb', line 42 def logger self.class.logger end |