class CoopAl::Trace

Trace

Attributes

stream[W]
tracing[W]

Public Class Methods

new() click to toggle source
# File lib/coop_al/trace.rb, line 12
def initialize
  @tracing = false
  @stream = STDOUT
end

Public Instance Methods

error(s) click to toggle source
# File lib/coop_al/trace.rb, line 25
def error(s)
  @stream.puts("[ERROR] #{s}") if @tracing
end
info(s) click to toggle source
# File lib/coop_al/trace.rb, line 17
def info(s)
  @stream.puts(s) if @tracing
end
warn(s) click to toggle source
# File lib/coop_al/trace.rb, line 21
def warn(s)
  @stream.puts("[WARNING] #{s}") if @tracing
end