Class: Lineprof
- Inherits:
-
Object
- Object
- Lineprof
- Defined in:
- lib/lineprof.rb,
lib/lineprof/version.rb
Constant Summary collapse
- IGNORE_PATTERN =
/lib\/lineprof\.rb$/- DEFAULT_PATTERN =
/./- VERSION =
"0.1.1"
Class Method Summary collapse
Class Method Details
.profile(filename = caller_filename(caller), &block) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/lineprof.rb', line 9 def profile(filename = caller_filename(caller), &block) value = nil result = lineprof(filename) { value = block.call } puts Term::ANSIColor.blue("\n[Lineprof] #{'=' * 70}") puts "\n#{format(result)}\n" value end |