Class: Pgtk::Pool::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/pgtk/pool.rb

Overview

A temporary class for logging.

Instance Method Summary collapse

Constructor Details

#initialize(out) ⇒ Log

Returns a new instance of Log.



33
34
35
# File 'lib/pgtk/pool.rb', line 33

def initialize(out)
  @out = out
end

Instance Method Details

#debug(msg) ⇒ Object



37
38
39
40
41
42
43
# File 'lib/pgtk/pool.rb', line 37

def debug(msg)
  if @out.respond_to?(:debug)
    @out.debug(msg)
  elsif @out.respond_to?(:puts)
    @out.puts(msg)
  end
end