Class: Rollbar::Item::Locals

Inherits:
Object
  • Object
show all
Defined in:
lib/rollbar/item/locals.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.exception_framesObject



8
9
10
# File 'lib/rollbar/item/locals.rb', line 8

def exception_frames
  Rollbar.notifier.exception_bindings
end

.frame_for_location(filename, lineno) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/rollbar/item/locals.rb', line 20

def frame_for_location(filename, lineno)
  while (frame = exception_frames.pop)
    return nil unless frame
    return frame if matching_frame?(frame, filename, lineno)
  end
  nil
end

.locals_for_location(filename, lineno) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/rollbar/item/locals.rb', line 12

def locals_for_location(filename, lineno)
  if (frame = frame_for_location(filename, lineno))
    scrub(locals_for(frame[:binding]))
  else
    {}
  end
end