Class: Raven::StacktraceInterface

Inherits:
Interface
  • Object
show all
Defined in:
lib/raven/interfaces/stack_trace.rb

Defined Under Namespace

Classes: Frame

Instance Method Summary collapse

Methods inherited from Interface

name

Methods included from BetterAttrAccessor

#attributes, included

Constructor Details

#initialize(*arguments) ⇒ StacktraceInterface

Returns a new instance of StacktraceInterface.



9
10
11
12
# File 'lib/raven/interfaces/stack_trace.rb', line 9

def initialize(*arguments)
  self.frames = []
  super(*arguments)
end

Instance Method Details

#frame(attributes = nil, &block) ⇒ Object



20
21
22
# File 'lib/raven/interfaces/stack_trace.rb', line 20

def frame(attributes = nil, &block)
  Frame.new(attributes, &block)
end

#to_hash(*args) ⇒ Object



14
15
16
17
18
# File 'lib/raven/interfaces/stack_trace.rb', line 14

def to_hash(*args)
  data = super(*args)
  data['frames'] = data['frames'].map { |frame| frame.to_hash }
  data
end