Class: GEPA::Logging::BufferingLogger

Inherits:
Logger
  • Object
show all
Defined in:
lib/gepa/logging/logger.rb

Overview

Logger that captures messages into memory (handy for tests).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBufferingLogger

Returns a new instance of BufferingLogger.



47
48
49
# File 'lib/gepa/logging/logger.rb', line 47

def initialize
  @messages = []
end

Instance Attribute Details

#messagesObject (readonly)

Returns the value of attribute messages.



45
46
47
# File 'lib/gepa/logging/logger.rb', line 45

def messages
  @messages
end

Instance Method Details

#log(message) ⇒ Object



51
52
53
# File 'lib/gepa/logging/logger.rb', line 51

def log(message)
  @messages << message
end