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



282
283
284
# File 'lib/asproject.rb', line 282

def Logger.debug
  return @@debug
end

.debug=(debug) ⇒ Object



278
279
280
# File 'lib/asproject.rb', line 278

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

.flushObject



302
303
304
305
306
307
# File 'lib/asproject.rb', line 302

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

.printf(msg) ⇒ Object



294
295
296
297
298
299
300
# File 'lib/asproject.rb', line 294

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

.puts(line) ⇒ Object



286
287
288
289
290
291
292
# File 'lib/asproject.rb', line 286

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