class Sibit::Log
Log
.
Public Class Methods
new(log = $stdout)
click to toggle source
Constructor.
You may provide the log you want to see the messages in. If you don't provide anything, the console will be used. The object you provide has to respond to the method info
or puts
in order to receive logging messages.
# File lib/sibit/log.rb, line 37 def initialize(log = $stdout) @log = log end
Public Instance Methods
info(msg)
click to toggle source
# File lib/sibit/log.rb, line 41 def info(msg) if @log.respond_to?(:info) @log.info(msg) elsif @log.respond_to?(:puts) @log.puts(msg) end end