Method: Logue::Stack#initialize
- Defined in:
- lib/logue/stack.rb
#initialize(depth: 2) ⇒ Stack
10 11 12 13 14 15 16 17 |
# File 'lib/logue/stack.rb', line 10 def initialize depth: 2 # caller_locations requires Ruby 2.0+ locations = caller_locations depth @frames = locations.collect do |loc| # no absolute_path from "(eval)" Frame.new path: loc.absolute_path || loc.path, line: loc.lineno, method: loc.label end end |