Module: Bio::FlatFileIndex::DEBUG
- Defined in:
- lib/bio/io/flatfile/index.rb
Overview
Module for output debug messages. Default setting: If $DEBUG or $VERBOSE is true, output debug messages to $stderr; Otherwise, don’t output messages.
Constant Summary collapse
- @@out =
$stderr
- @@flag =
nil
Class Method Summary collapse
-
.out ⇒ Object
get current debug messeages output destination.
-
.out=(io) ⇒ Object
Set debug messages output destination.
-
.print(*arg) ⇒ Object
prints debug messages.
Class Method Details
.out ⇒ Object
get current debug messeages output destination
424 425 426 |
# File 'lib/bio/io/flatfile/index.rb', line 424 def self.out @@out end |
.out=(io) ⇒ Object
Set debug messages output destination. If true is given, outputs to $stderr. If nil is given, outputs nothing. This method affects ALL of FlatFileIndex related objects/methods.
411 412 413 414 415 416 417 418 419 420 421 |
# File 'lib/bio/io/flatfile/index.rb', line 411 def self.out=(io) if io then @@out = io @@out = $stderr if io == true @@flag = true else @@out = nil @@flag = nil end @@out end |
.print(*arg) ⇒ Object
prints debug messages
429 430 431 432 |
# File 'lib/bio/io/flatfile/index.rb', line 429 def self.print(*arg) @@flag = true if $DEBUG or $VERBOSE @@out.print(*arg) if @@out and @@flag end |