Class: V8::StackTrace
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(to, native) ⇒ StackTrace
constructor
A new instance of StackTrace.
- #length ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(to, native) ⇒ StackTrace
Returns a new instance of StackTrace.
7 8 9 10 |
# File 'lib/v8/stack.rb', line 7 def initialize(to, native) @to = to @native = native end |
Instance Method Details
#each ⇒ Object
16 17 18 19 20 |
# File 'lib/v8/stack.rb', line 16 def each for i in 0..length - 1 yield V8::StackFrame.new(@to, @native.GetFrame(i)) end end |
#length ⇒ Object
12 13 14 |
# File 'lib/v8/stack.rb', line 12 def length @native.GetFrameCount() end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/v8/stack.rb', line 22 def to_s map {|f|"at #{f}"}.join("\n") end |