module WhirledPeas::Graphics

Attributes

debug[RW]

Public Class Methods

debugger(string_or_proc) click to toggle source
# File lib/whirled_peas/graphics.rb, line 6
def debugger(string_or_proc)
  return unless @debug
  @debugger ||= Logger.new(STDOUT, level: Logger::DEBUG)
  if string_or_proc.is_a?(Proc)
    string = string_or_proc.call
  else
    string = string_or_proc
  end
  @debugger.debug(string)
end