Class: Log4r::StringOutputter
- Inherits:
-
StdoutOutputter
- Object
- StdoutOutputter
- Log4r::StringOutputter
- Defined in:
- lib/minitest/log4r.rb
Overview
Define a new Log4r-outputter to catch data into an String.
Instance Method Summary collapse
-
#flush ⇒ Object
Clear message string and return messages.
-
#write(message) ⇒ Object
Collect messages in array.
Instance Method Details
#flush ⇒ Object
Clear message string and return messages.
24 25 26 27 28 29 |
# File 'lib/minitest/log4r.rb', line 24 def flush @messages ||= '' #create with first call = @messages.dup @messages = '' .empty? ? nil : end |
#write(message) ⇒ Object
Collect messages in array.
17 18 19 20 |
# File 'lib/minitest/log4r.rb', line 17 def write() @messages ||= '' #create with first call @messages << end |