Class: Opbeat::StacktraceInterface
- Defined in:
- lib/opbeat/interfaces/stack_trace.rb
Defined Under Namespace
Classes: Frame
Instance Method Summary collapse
- #frame(attributes = nil, &block) ⇒ Object
-
#initialize(*arguments) ⇒ StacktraceInterface
constructor
A new instance of StacktraceInterface.
- #to_hash ⇒ Object
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/opbeat/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/opbeat/interfaces/stack_trace.rb', line 23 def frame(attributes=nil, &block) Frame.new(attributes, &block) end |
#to_hash ⇒ Object
17 18 19 20 21 |
# File 'lib/opbeat/interfaces/stack_trace.rb', line 17 def to_hash data = super data['frames'] = data['frames'].map{|frame| frame.to_hash} data end |