Class: AsProject::Logger

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

Constant Summary collapse

@@output =
''
@@debug =
false

Class Method Summary collapse

Class Method Details

.debugObject



284
285
286
# File 'lib/asproject.rb', line 284

def Logger.debug
  return @@debug
end

.debug=(debug) ⇒ Object



280
281
282
# File 'lib/asproject.rb', line 280

def Logger.debug=(debug)
  @@debug = debug
end

.flushObject



304
305
306
307
308
309
# File 'lib/asproject.rb', line 304

def Logger.flush
  if(!Logger.debug)
    $stdout.puts @@output
  end
  @@output = ''
end

.printf(msg) ⇒ Object



296
297
298
299
300
301
302
# File 'lib/asproject.rb', line 296

def Logger.printf(msg)
  if(!Logger.debug)
    $stdout.puts msg
  else
    @@output << msg
  end
end

.puts(line) ⇒ Object



288
289
290
291
292
293
294
# File 'lib/asproject.rb', line 288

def Logger.puts(line)
  if(!Logger.debug)
    $stdout.puts line
  else
    @@output << "#{line}\n"
  end
end