Class: V8::StackFrame
- Inherits:
-
Object
- Object
- V8::StackFrame
- Defined in:
- lib/v8/stack.rb
Instance Method Summary collapse
- #column ⇒ Object
- #constructor? ⇒ Boolean
- #eval? ⇒ Boolean
- #function_name ⇒ Object
-
#initialize(native, context) ⇒ StackFrame
constructor
A new instance of StackFrame.
- #line_number ⇒ Object
- #script_name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(native, context) ⇒ StackFrame
Returns a new instance of StackFrame.
34 35 36 37 |
# File 'lib/v8/stack.rb', line 34 def initialize(native, context) @context = context @native = native end |
Instance Method Details
#column ⇒ Object
57 58 59 60 61 |
# File 'lib/v8/stack.rb', line 57 def column @context.enter do @native.GetColumn() end end |
#constructor? ⇒ Boolean
69 70 71 72 73 |
# File 'lib/v8/stack.rb', line 69 def constructor? @context.enter do @native.IsConstructor() end end |
#eval? ⇒ Boolean
63 64 65 66 67 |
# File 'lib/v8/stack.rb', line 63 def eval? @context.enter do @native.IsEval() end end |
#function_name ⇒ Object
45 46 47 48 49 |
# File 'lib/v8/stack.rb', line 45 def function_name @context.enter do @context.to_ruby(@native.GetFunctionName()) end end |
#line_number ⇒ Object
51 52 53 54 55 |
# File 'lib/v8/stack.rb', line 51 def line_number @context.enter do @native.GetLineNumber() end end |
#script_name ⇒ Object
39 40 41 42 43 |
# File 'lib/v8/stack.rb', line 39 def script_name @context.enter do @context.to_ruby(@native.GetScriptName()) end end |
#to_s ⇒ Object
75 76 77 78 79 80 81 82 83 |
# File 'lib/v8/stack.rb', line 75 def to_s @context.enter do "at " + if !function_name.empty? "#{function_name} (#{script_name}:#{line_number}:#{column})" else "#{script_name}:#{line_number}:#{column}" end end end |