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

#assert_required_properties_set!, name

Constructor Details

#initialize(*arguments) ⇒ StacktraceInterface

Returns a new instance of StacktraceInterface.



12
13
14
15
# File 'lib/raven/interfaces/stack_trace.rb', line 12

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

Instance Method Details

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



23
24
25
# File 'lib/raven/interfaces/stack_trace.rb', line 23

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

#to_hashObject



17
18
19
20
21
# File 'lib/raven/interfaces/stack_trace.rb', line 17

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