Sha256: ad1853aa83386cf05aee52db48303a00aec7989d72657bb9b301afd6afd407fa
Contents?: true
Size: 493 Bytes
Versions: 5
Compression:
Stored size: 493 Bytes
Contents
# Logs to a string. # This is useful in testing so that we can read back what # was put into the log, to see if it was what was expected. class StringLogger def initialize(*params) @log = StringIO.new("", "w") end def close end def puts(msg) @log.puts(msg) end def string @log.string end alias debug puts alias info puts alias notice puts alias warning puts alias err puts alias error err alias alert puts alias emerg puts alias crit puts end
Version data entries
5 entries across 5 versions & 1 rubygems