Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/ken/util.rb
Instance Method Summary collapse
-
#print_call_stack(from = 2, to = nil, html = false) ⇒ Object
nice for debugging usage: print_call_stack(:method_name, 2, 10).
Instance Method Details
#print_call_stack(from = 2, to = nil, html = false) ⇒ Object
nice for debugging usage: print_call_stack(:method_name, 2, 10)
22 23 24 25 26 |
# File 'lib/ken/util.rb', line 22 def print_call_stack(from = 2, to = nil, html = false) (from..(to ? to : caller.length)).each do |idx| p "[#{idx}]: #{caller[idx]}#{html ? '<br />' : ''}" end end |