Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/dlog.rb
Instance Method Summary collapse
- #benchmark(*args, &block) ⇒ Object
- #benchslow(*args, &block) ⇒ Object
- #dlog(*args) ⇒ Object
- #rlog(*args) ⇒ Object
Instance Method Details
#benchmark(*args, &block) ⇒ Object
284 285 286 287 288 289 290 291 292 |
# File 'lib/dlog.rb', line 284 def benchmark(*args, &block) if Dlog.quiet? Dlog::NoBenchmark elsif args.empty? && !block_given? Dlog::Benchmark else Dlog::Benchmark.benchmark :info, args, &block end end |
#benchslow(*args, &block) ⇒ Object
294 295 296 297 298 299 300 301 302 |
# File 'lib/dlog.rb', line 294 def benchslow(*args, &block) if Dlog.quiet? Dlog::NoBenchmark elsif args.empty? && !block_given? Dlog::Benchslow else Dlog::Benchslow.benchmark :info, args, &block end end |