Module: SemanticLogger::Attribute
- Defined in:
- lib/semantic_logger/attribute.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
28 29 30 31 32 33 34 35 36 37 |
# File 'lib/semantic_logger/attribute.rb', line 28 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
40 41 42 |
# File 'lib/semantic_logger/attribute.rb', line 40 def logger self.class.logger end |