Class: Rookout::Processor::Namespaces::StackNamespace
- Inherits:
-
Namespace
- Object
- Namespace
- Rookout::Processor::Namespaces::StackNamespace
show all
- Defined in:
- lib/rookout/processor/namespaces/stack_namespace.rb
Instance Method Summary
collapse
Methods inherited from Namespace
#dump, #read_attribute, #write_attribute
Constructor Details
#initialize(stack_trace, offset = 0) ⇒ StackNamespace
Returns a new instance of StackNamespace.
10
11
12
13
14
|
# File 'lib/rookout/processor/namespaces/stack_namespace.rb', line 10
def initialize stack_trace, offset = 0
super()
@stack_trace = stack_trace
@offset = offset
end
|
Instance Method Details
#call_method(name, args) ⇒ Object
20
21
22
23
|
# File 'lib/rookout/processor/namespaces/stack_namespace.rb', line 20
def call_method name, args
return create_traceback args if name == "traceback"
super
end
|
#create_traceback(args) ⇒ Object
25
26
27
28
|
# File 'lib/rookout/processor/namespaces/stack_namespace.rb', line 25
def create_traceback args
args = 1000 if args == ""
TracebackNamespace.new @stack_trace, @offset, args.to_i
end
|
#read_key(key) ⇒ Object
16
17
18
|
# File 'lib/rookout/processor/namespaces/stack_namespace.rb', line 16
def read_key key
FrameNamespace.new nil, @stack_trace[key + @offset]
end
|