Class: LoggerHolder
- Inherits:
- 
      Object
      
        - Object
- LoggerHolder
 
- Defined in:
- lib/source/logger_holder.rb
Instance Attribute Summary collapse
- 
  
    
      #logger  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute logger. 
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize  ⇒ LoggerHolder 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of LoggerHolder. 
Constructor Details
#initialize ⇒ LoggerHolder
Returns a new instance of LoggerHolder.
| 9 10 11 | # File 'lib/source/logger_holder.rb', line 9 def initialize @logger = Logger.new(STDOUT) end | 
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
| 7 8 9 | # File 'lib/source/logger_holder.rb', line 7 def logger @logger end | 
Class Method Details
.instance ⇒ Object
| 13 14 15 16 17 18 19 20 21 | # File 'lib/source/logger_holder.rb', line 13 def self.instance return @instance.logger if @instance @instance_mutex.synchronize do @instance ||= new end @instance.logger end |